Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Do not store metrics in DB #31755

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Release] Do not store metrics in DB
Signed-off-by: Antoni Baum <[email protected]>
  • Loading branch information
Yard1 committed Jan 18, 2023
commit 5b0a91a2a26d4996b11122a4613e6936f0bdb5e4
22 changes: 6 additions & 16 deletions release/ray_release/reporter/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def __init__(self):
def report_result(self, test: Test, result: Result):
logger.info("Persisting result to the databricks delta lake...")

# Prometheus metrics are saved as buildkite artifacts
# and can be obtained using buildkite API.

result_json = {
"_table": "release_test_result",
"report_timestamp_ms": int(time.time() * 1000),
Expand All @@ -34,7 +37,6 @@ def report_result(self, test: Test, result: Result):
"stable": result.stable,
"return_code": result.return_code,
"smoke_test": result.smoke_test,
"prometheus_metrics": result.prometheus_metrics or {},
"extra_tags": result.extra_tags or {},
}

Expand All @@ -46,20 +48,8 @@ def report_result(self, test: Test, result: Result):
Record={"Data": json.dumps(result_json)},
)
except Exception:
try:
# This may happen if metrics are too big.
# TODO persist big metrics in an alternative fashion
logger.warning(
"Couldn't persist with prometheus_metrics, trying without them"
)
result_json.pop("prometheus_metrics", None)
self.firehose.put_record(
DeliveryStreamName="ray-ci-results",
Record={"Data": json.dumps(result_json)},
)
except Exception:
logger.exception(
"Failed to persist result to the databricks delta lake"
)
logger.exception(
"Failed to persist result to the databricks delta lake"
)
Yard1 marked this conversation as resolved.
Show resolved Hide resolved
else:
logger.info("Result has been persisted to the databricks delta lake")