ci(metrics): Make PR metric diffs informational#8605
Conversation
Signed-off-by: Yuri Shkuro <github@ysh.us>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the CI metrics snapshot comparison flow so that metric diffs (i.e., changes detected in snapshot output) are treated as informational for pull requests, while infrastructure/reporting failures (e.g., missing diff artifacts or unreadable totals) remain blocking. This aligns with the goal of reducing PR failures caused by nondeterministic runtime metric series while preserving visibility into metric changes.
Changes:
- Make snapshot diffs non-blocking by reporting them as warnings (not failures) in the metrics summary step.
- Update CI summary publishing logic to mark metric diffs as
successwith warning text, while keeping infra/parse failures asfailure. - Update unit tests and workflow comments to reflect the new “informational diffs” behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
scripts/e2e/metrics_summary.sh |
Stops failing the step on total_changes > 0; emits warnings for diffs while keeping missing diff artifacts blocking. |
.github/workflows/ci-summary-report.yml |
Clarifies gating intent: only blocking gates fail the job; metrics diffs are informational but infra issues still fail. |
.github/scripts/ci-summary-report-publish.js |
Updates computeMetrics() so diffs produce warning text but a success conclusion; infra/parse failures remain failure. |
.github/scripts/ci-summary-report-publish.test.js |
Updates expectations to match the new informational/warning metrics behavior in published summaries/comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8605 +/- ##
==========================================
+ Coverage 96.14% 96.59% +0.44%
==========================================
Files 331 331
Lines 17566 17566
==========================================
+ Hits 16888 16967 +79
+ Misses 531 451 -80
- Partials 147 148 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CI Summary ReportMetrics Comparison❌ 36 metric change(s) detected View changed metricsFor label-level diff details, open the CI run and expand the "Compare metrics and generate summary" step logs. metrics_snapshot_elasticsearch_8.x_e2e — ⬇️ download diff
Code Coverage✅ Coverage 97.3% (baseline 97.3%) ➡️ View CI run | View publish logs |
## Summary - Make PR metrics comparison non-blocking when snapshot diffs are found. - Keep metrics infra/reporting failures blocking when diff artifacts are missing or totals cannot be read. - Render metric diffs as warning/informational in PR comments and check summaries. ## Context Recent PRs have been blocked by flaky metric snapshot diffs unrelated to the PR changes. For example, PR jaegertracing#8603 had all CI jobs pass, then failed Metrics Comparison because one Elasticsearch 9.x E2E snapshot observed transient FindTraces error-path series while the other did not. This preserves visibility into metric diffs without making unrelated PRs depend on deterministic runtime metric presence. ## Follow-ups - Add explicit exclusions for known nondeterministic error-path series, such as jaeger_storage_requests/latency with result=err and rpc_server_call_duration with UNKNOWN/non-OK status. - Make hard metric gating opt-in through a label or path-based trigger for telemetry/metrics-sensitive changes. - Stabilize the E2E metric snapshot source by making the tests wait for backend readiness before query retries or by deliberately exercising a deterministic set of success/error paths before scraping. - Consider retry/quorum semantics for metrics diffs, rerunning only the affected E2E matrix entry before reporting a blocking failure. - Move hard metric snapshot gating to main/nightly/release validation while keeping PR-level reporting informational. ## Testing - npm test -- ci-summary-report-publish.test.js - make fmt - make lint - make test Note: make lint and make test needed to be rerun with normal local access because the sandbox blocked the Go build cache and local test listeners. Signed-off-by: Yuri Shkuro <github@ysh.us> Signed-off-by: Victor Chidera Obiezue <obiezuechidera@gmail.com>
Summary
Context
Recent PRs have been blocked by flaky metric snapshot diffs unrelated to the PR changes. For example, PR #8603 had all CI jobs pass, then failed Metrics Comparison because one Elasticsearch 9.x E2E snapshot observed transient FindTraces error-path series while the other did not.
This preserves visibility into metric diffs without making unrelated PRs depend on deterministic runtime metric presence.
Follow-ups
Testing
Note: make lint and make test needed to be rerun with normal local access because the sandbox blocked the Go build cache and local test listeners.