Skip to content

ci(metrics): Make PR metric diffs informational#8605

Merged
yurishkuro merged 1 commit into
jaegertracing:mainfrom
yurishkuro:nonblocking-metrics-comparison
May 21, 2026
Merged

ci(metrics): Make PR metric diffs informational#8605
yurishkuro merged 1 commit into
jaegertracing:mainfrom
yurishkuro:nonblocking-metrics-comparison

Conversation

@yurishkuro

Copy link
Copy Markdown
Member

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 #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>
@yurishkuro yurishkuro requested a review from a team as a code owner May 21, 2026 21:19
Copilot AI review requested due to automatic review settings May 21, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 success with warning text, while keeping infra/parse failures as failure.
  • 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

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.59%. Comparing base (a769267) to head (cb135cc).

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     
Flag Coverage Δ
badger_direct 8.94% <ø> (ø)
badger_e2e 1.04% <ø> (ø)
cassandra-4.x-direct-manual 14.55% <ø> (ø)
cassandra-4.x-e2e-auto 1.03% <ø> (ø)
cassandra-4.x-e2e-manual 1.03% <ø> (ø)
cassandra-5.x-direct-manual 14.55% <ø> (ø)
cassandra-5.x-e2e-auto 1.03% <ø> (ø)
cassandra-5.x-e2e-manual 1.03% <ø> (ø)
clickhouse-direct 8.97% <ø> (?)
clickhouse-e2e 1.16% <ø> (ø)
elasticsearch-6.x-direct 16.87% <ø> (ø)
elasticsearch-7.x-direct 16.91% <ø> (ø)
elasticsearch-8.x-direct 17.05% <ø> (ø)
elasticsearch-8.x-e2e 1.09% <ø> (+0.04%) ⬆️
elasticsearch-9.x-e2e 1.04% <ø> (ø)
grpc_direct 7.90% <ø> (ø)
grpc_e2e 1.04% <ø> (ø)
kafka-3.x-v2 1.04% <ø> (ø)
memory_v2 1.04% <ø> (ø)
opensearch-1.x-direct 16.95% <ø> (ø)
opensearch-2.x-direct 16.95% <ø> (ø)
opensearch-2.x-e2e 1.04% <ø> (ø)
opensearch-3.x-e2e 1.04% <ø> (ø)
query 1.04% <ø> (ø)
tailsampling-processor 0.55% <ø> (ø)
unittests 94.89% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

CI Summary Report

Metrics Comparison

❌ 36 metric change(s) detected

View changed metrics

For 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
3 added

  • jaeger_storage_latency
  • jaeger_storage_requests
  • rpc_server_call_duration

Code Coverage

✅ Coverage 97.3% (baseline 97.3%)

➡️ View CI run | View publish logs
2026-05-21 21:30:59 UTC

@yurishkuro yurishkuro merged commit 37e8ef7 into jaegertracing:main May 21, 2026
71 of 73 checks passed
@yurishkuro yurishkuro deleted the nonblocking-metrics-comparison branch May 21, 2026 22:00
vic-comm pushed a commit to vic-comm/jaeger that referenced this pull request Jun 11, 2026
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants