Skip to content

Introduce Flaky-Test Detection - #798

Draft
castler wants to merge 3 commits into
eclipse-score:mainfrom
castler:js_flaky_test_detection
Draft

Introduce Flaky-Test Detection#798
castler wants to merge 3 commits into
eclipse-score:mainfrom
castler:js_flaky_test_detection

Conversation

@castler

@castler castler commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Introduce reusable composite actions to support CI, particularly the
nightly flaky-test detection pipeline:

- setup_qnx_environment: installs QEMU, enables KVM permissions and
  provisions the QNX license, with a post step that cleans the license
  up. Replaces the inline QNX/QEMU setup previously duplicated in
  build_and_test_qnx.
- upload_bazel_testlogs_on_failure: collects and uploads bazel-testlogs
  as an artifact when a test step fails, wired into the gcc15, ASan/UBSan/
  LSan, TSan and QNX workflows.
- prepare_bazel_environment: add an optional repository-cache input so
  callers can opt into the Bazel repository cache.

Also ignore the local .worktrees/ directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castler
castler force-pushed the js_flaky_test_detection branch from aaa089b to 617c082 Compare July 28, 2026 20:34
castler and others added 2 commits July 28, 2026 23:34
Add a scheduled/dispatchable workflow that repeatedly runs the test
suite across all supported configurations to surface flaky tests.

- nightly_flaky_detection.yml orchestrates per-configuration runner jobs
  (gcc15 unit/integration, ASan/UBSan/LSan, TSan, QNX unit/integration)
  via the reusable _nightly_flaky_detection_runner.yml, using
  --runs_per_test with --runs_per_test_detects_flakes and collecting the
  Bazel build event protocol output per config.
- collect_flaky_tests.py parses the per-config BEP into a structured
  report; merge_flaky_reports.py aggregates all configs into a single
  per-target summary (JSON + Markdown step summary) and exposes counts as
  workflow outputs.
- Tests exclude themselves from detection via the no-flaky-test-detection
  tag; integration tests are tagged integration-test so the runner can
  select unit vs integration suites with --test_tag_filters.
- README_flaky_detection.md documents the pipeline; the scripts are
  packaged as Bazel py_binary/py_test targets with unit tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the ephemeral report-only model with self-updating GitHub issues,
so each flaky test target has a single durable, deduplicated issue that
accumulates history across nightly runs.

- sync_flaky_issues.py reconciles the merged flaky-target summary against
  existing issues: it creates one issue per target on first detection and,
  on recurrence, increments a cumulative counter, refreshes a managed
  stats region in the body and appends a run comment. Per-run comments are
  the source of truth (cumulative totals are recomputed from them), the
  run_id makes reruns idempotent, and closed issues are reopened rather
  than duplicated. Robust to human edits: a corrupted managed body block
  is rebuilt from the comment ledger.
- The aggregate job gains issues: write permission and a sync step that
  runs after the report is built.
- Unit tests cover creation, recurrence increment, idempotency, reopen and
  corrupted-body recovery.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castler castler removed their assignment Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant