Skip to content

🌱 E2E Summary Output Fix#2751

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
dtfranz:e2e-summary-fix
Jun 10, 2026
Merged

🌱 E2E Summary Output Fix#2751
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
dtfranz:e2e-summary-fix

Conversation

@dtfranz

@dtfranz dtfranz commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

The serial e2e tests require pod restarts which causes the metrics to scrape two sets of results, which the summary generator did not allow. Now, the results from the new pod will be aggregated to the final set.

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings June 8, 2026 07:58
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2026
@netlify

netlify Bot commented Jun 8, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit b6bada4
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6a27a2b3a4103300084a7071
😎 Deploy Preview https://deploy-preview-2751--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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 updates the E2E summary generator to tolerate Prometheus queries returning multiple time series (e.g., due to operator pod restarts during serial E2E runs), and reorganizes the summary logic/templates under test/internal/summary.

Changes:

  • Relaxed PerformanceQuery to accept multiple result streams instead of requiring exactly one.
  • Added new markdown templates for the overall summary, alerts, and mermaid charts.
  • Switched E2E suite wiring to call the new test/internal/summary package and removed the old test util helper.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/internal/summary/templates/summary.md.tmpl Adds the main E2E summary markdown template and performance section layout.
test/internal/summary/templates/mermaid_chart.md.tmpl Adds a mermaid xychart-beta template used by performance queries.
test/internal/summary/templates/alert.md.tmpl Adds alert rendering template for firing/pending alerts.
test/internal/summary/summary.go Implements summary generation, Prometheus querying, and template execution with updated behavior for multiple streams.
test/internal/summary/artifacts.go Renames package to align with the new summary package structure.
test/e2e/features_test.go Calls summary.PrintSummary from the new package at the end of successful E2E runs.
internal/shared/util/test/utils.go Removes the old FindK8sClient helper (now unused).
Comments suppressed due to low confidence (2)

test/internal/summary/summary.go:87

  • When all samples are <= 0 (e.g., negative deriv(...) values), initializing chart.YMax to math.SmallestNonzeroFloat64 prevents YMax from ever updating (since 0 > SmallestNonzeroFloat64 is false). This produces an incorrect y-axis range in the rendered chart.
    test/internal/summary/summary.go:96
  • PerformanceQuery now allows multiple Prometheus result streams (e.g., when a pod restarts), but it concatenates each stream's samples in whatever order Prometheus returns them. That order is label-sorted, not time-sorted, so the final line data can be out of chronological order and render a misleading chart. Sort the streams by their first sample timestamp before appending values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The serial e2e tests require pod restarts which causes the metrics to scrape two sets of results, which the summary generator did not allow. Now, the results from the new pod will be aggregated to the final set.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@dtfranz dtfranz force-pushed the e2e-summary-fix branch from 0faddeb to b6bada4 Compare June 9, 2026 05:20
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.06%. Comparing base (053a6d5) to head (b6bada4).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
test/internal/summary/summary.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2751      +/-   ##
==========================================
- Coverage   67.10%   67.06%   -0.04%     
==========================================
  Files         149      148       -1     
  Lines       11341    11330      -11     
==========================================
- Hits         7610     7599      -11     
+ Misses       3178     3177       -1     
- Partials      553      554       +1     
Flag Coverage Δ
e2e 35.20% <ø> (+0.02%) ⬆️
experimental-e2e 52.61% <ø> (-0.26%) ⬇️
unit 52.30% <0.00%> (+0.05%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@dtfranz dtfranz marked this pull request as ready for review June 10, 2026 07:57
Copilot AI review requested due to automatic review settings June 10, 2026 07:57
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 10, 2026
@openshift-ci openshift-ci Bot requested review from fgiudici and joelanford June 10, 2026 07:57

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

Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

test/internal/summary/summary.go:96

  • The current loop appends samples from every returned series in matrix without preserving timestamp order. When Prometheus returns multiple series (e.g., old+new pod after a restart), concatenating series in label-sorted order can scramble the timeline and produce a misleading chart. Merge samples from all series in timestamp order (and error if no samples are returned) before computing min/max and chart data.
    test/internal/summary/summary.go:159
  • executeTemplate builds the template path from os.Getwd(), which makes summary generation sensitive to the caller's working directory. If the tests are invoked from a different cwd (or the process chdirs), template parsing will fail at runtime. Prefer resolving templates relative to the source (e.g., //go:embed + template.ParseFS, or deriving the directory via runtime.Caller) instead of Getwd().

Comment thread test/e2e/features_test.go
Comment on lines +50 to 53
if err := summary.PrintSummary(path); err != nil {
// Alert but do not fail the run if alerts are found
fmt.Printf("%v", err)
os.Exit(1)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We've not had the performance results for a long time, and currently they're firing alerts pretty reliably because of the recent move to concurrent test runs which cause the pods to use far more resources.

Until we've had a chance to re-tune the alert thresholds, I'd like for this to fail silently but at least give us the feedback we need to make those adjustments.

@perdasilva

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2026
@tmshort

tmshort commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2026

@rashmigottipati rashmigottipati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rashmigottipati, tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 23b7e52 into operator-framework:main Jun 10, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants