feat: Implement flaky test monitoring system#1379
Conversation
- Update `tests.yml` to generate JUnit XML reports for Go, Rust, and Node.js tests. - Add `flaky-monitor` job to aggregate and analyze historical test results. - Create `scripts/analyze_flaky_tests.py` to calculate test flakiness grouped by OS. - Configure automatic reporting to GitHub Step Summary and PR comments. - Use `test-results` branch for persistent history storage.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
🛡️ Test Health ReportNo flaky tests detected in this batch! 🎉 |
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by using `--` separator.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by explicitly adding GOPATH/bin to GITHUB_PATH. - Ensure `npx` is available in Rust job by adding `setup-node` step.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step. - Pin `gotestsum` to v1.12.0 to support Go 1.23.4.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step. - Pin `gotestsum` to v1.12.0 to support Go 1.23.4. - Use `shell: bash` explicitly for steps using bash syntax to prevent PowerShell errors on Windows runners.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step. - Pin `gotestsum` to v1.12.0 to support Go 1.23.4. - Use `shell: bash` explicitly for steps using bash syntax to prevent PowerShell errors on Windows runners. - Revert unintended version downgrade in `.devcontainer/devcontainer.json`.
| ```bash | ||
| cd realm/implants/imix/ | ||
| # Tell the linker to use the MacOSX.sdk | ||
| export SDKROOT="/MacOSX.sdk/"; export RUSTFLAGS="-Clink-arg=-isysroot -Clink-arg=/MacOSX.sdk -Clink-arg=-F/MacOSX.sdk/System/Library/Frameworks -Clink-arg=-L/MacOSX.sdk/usr/lib -Clink-arg=-lresolv" |
There was a problem hiding this comment.
Don't remove this from our user guide
There was a problem hiding this comment.
Apologies, I will restore this line in the documentation.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step. - Pin `gotestsum` to v1.12.0 to support Go 1.23.4. - Use `shell: bash` explicitly for steps using bash syntax to prevent PowerShell errors on Windows runners. - Revert unintended version downgrade in `.devcontainer/devcontainer.json`. - Restore missing documentation in `docs/_docs/user-guide/imix.md`.
- Update `tests.yml` to generate CTRF reports for Go, Rust, and Node.js tests. - Use `go-ctrf-json-reporter` for Go tests. - Use `junit-to-ctrf` for Rust and Node.js tests (converting JUnit XML). - Add `flaky-monitor` job using `ctrf-io/github-test-reporter` to track and report flaky tests with comprehensive reporting options enabled. - Configure historical data tracking via artifact retention. - Fix argument passing for `cargo llvm-cov` by configuring `nextest.toml` for JUnit output. - Fix PATH issues for `go-ctrf-json-reporter` by calling binary with full path. - Ensure `npx` is available in Rust job by adding `setup-node` step. - Pin `gotestsum` to v1.12.0 to support Go 1.23.4. - Use `shell: bash` explicitly for steps using bash syntax to prevent PowerShell errors on Windows runners. - Revert unintended version downgrade in `.devcontainer/devcontainer.json`. - Restore missing documentation in `docs/_docs/user-guide/imix.md`. - Correctly locate `nextest.toml` in `.config/` directory.
Summary
Previous Results
Insights
Fail Rate
Failed TestsNo failed tests ✨ Slowest Tests
🍂 No flaky tests detected across all runs. | ⏱️ Measured over 23 runs. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
The `implants` test job was failing to generate CTRF reports because the `junit.xml` output from `cargo nextest` was located in a subdirectory (e.g., `target/nextest/default/junit.xml`) rather than the workspace root. This caused the `mv` command to fail, skipping the conversion step and ultimately causing the artifact upload to fail with "No files were found". This change updates the workflow to dynamically search for `junit.xml` using `find` (piped to `head -n 1` for macOS compatibility), ensuring the report is correctly located and processed regardless of the output directory structure. This also restores the `implants/.config/nextest.toml` configuration to ensure JUnit generation is enabled. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This PR implements a comprehensive system for monitoring flaky tests in the CI pipeline.
It introduces the following changes:
Data Collection:
tavern(Go): Usesgotestsumto output JUnit XML.implants(Rust): Configuresnextestto output JUnit XML viacargo llvm-cov.ui-tests(Node.js): Configures Vitest to use thejunitreporter.Analysis & Storage:
flaky-monitorjob that runs after all test jobs.test-results.scripts/analyze_flaky_tests.pyparses the historical XML data to identify tests with high failure rates, grouped by OS.Reporting:
This system allows the team to track test reliability over time and identify specific environments (OS) where tests are unstable.
PR created automatically by Jules for task 3414294539595760241 started by @KCarretto