Skip to content

Add nightly test-metrics workflow - #4689

Merged
ggivo merged 2 commits into
redis:masterfrom
bobymicroby:nightly-test-metrics
Aug 20, 2026
Merged

ggivo merged 2 commits into
redis:masterfrom
bobymicroby:nightly-test-metrics

Conversation

@bobymicroby

@bobymicroby bobymicroby commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Once a day, run the full test suite (unit and integration) against the newest unstable client-libs-test image and report every test's duration to PAWS via redis-developer/cae-otel-ci-visibility@v4, labeled server-version=unstable, for performance-regression tracking.

The workflow is self-contained: it no-ops with a warning until the OTEL_CI_VISIBILITY_TOKEN repository secret is set, needs only contents:read permissions, and changes no existing CI. To roll back, delete the workflow file.


Note

Low Risk
Adds an isolated workflow with contents:read only; it does not alter existing CI or application code, and skips entirely without the metrics secret.

Overview
Adds a new scheduled GitHub Actions workflow (.github/workflows/nightly-metrics.yaml) that runs once daily (and on workflow_dispatch) to measure test performance against the latest unstable redislabs/client-libs-test image.

The job no-ops with a warning unless OTEL_CI_VISIBILITY_TOKEN is set (a gate step works around secrets not being usable in if:). When enabled, it resolves the newest unstable-* tag from Docker Hub, boots the usual make start Docker test env, runs mvn clean verify (unit + integration in one pass, unlike the PR matrix), merges Surefire/Failsafe JUnit XML into a single folder with unit- / it- prefixes, and pushes per-test durations to Grafana via redis-developer/cae-otel-ci-visibility@v4 with server-version: unstable. Teardown runs on always(); metrics are reported even on test failure but not on cancel.

Reviewed by Cursor Bugbot for commit 000fb8c. Bugbot is set up for automated code reviews on this repo. Configure here.

Once a day, run the full test suite (unit and integration) against the
newest unstable client-libs-test image and report every test's duration
to Grafana via redis-developer/cae-otel-ci-visibility@v4, labeled
server-version=unstable, for performance-regression tracking.

The workflow is self-contained: it no-ops with a warning until the
OTEL_CI_VISIBILITY_TOKEN repository secret is set, needs only
contents:read permissions, and changes no existing CI. To roll back,
delete the workflow file.
Comment thread .github/workflows/nightly-metrics.yaml Resolved
When mvn stops before failsafe runs (unit-test or build failure),
target/failsafe-reports does not exist and the unexpanded glob made cp
fail the collect step under bash -e. nullglob skips absent suites so the
step only reports what actually ran.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 000fb8c. Configure here.


- name: Report test metrics
# Report even when tests fail, but not when the run was cancelled.
if: ${{ !cancelled() && steps.gate.outputs.run == 'true' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Metrics run after setup failure

Medium Severity

Collect JUnit XML and Report test metrics use !cancelled(), which correctly runs after a failed mvn verify, but also runs when earlier setup steps fail and the test step is skipped. That can upload empty or misleading metrics for a night when no tests executed, despite the comment targeting test failures only.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 000fb8c. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Verified this empirically rather than by reading: with an empty junit-reports/ (the setup-failure case) the action early-returns with a ::warning: No test suites found and exports nothing at all — zero requests leave the runner, confirmed against a local OTLP sink — so no empty or misleading metrics can ship, and the job is already red from the failed setup step; the guard lives inside the action rather than the workflow.

@ggivo
ggivo merged commit 3b81dfe into redis:master Aug 20, 2026
13 of 15 checks passed
@ggivo ggivo added testing churn Chore: Formatting and comment cleanup (non-functional change) labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

churn Chore: Formatting and comment cleanup (non-functional change) testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants