Skip to content

tests: fix flaky nested consumer tests in the gate - #14797

Merged
TrapsterDK merged 2 commits into
mainfrom
fix-gate-nested-consumers
Nov 24, 2026
Merged

TrapsterDK merged 2 commits into
mainfrom
fix-gate-nested-consumers

Conversation

@TrapsterDK

@TrapsterDK TrapsterDK commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #14770. Refs #14793, #14777.

The per-OS check and coverage jobs added in #14772 run dx check|coverage --affected without the exclusion that pr-check used to apply (manual|resources:nested_bazel:1|starter-consumer|network-consumer).

As a result, these nested-Bazel consumer tests time out every time on PRs that affect them. They are small tests (60 s), but their real cold run takes 100–550 s with network fetches (run 45224993805):

  • //tools/testing/consumer:go_prebuilt_guard_test
  • //tools/testing/consumer:java_prebuilt_guard_test
  • //tools/testing/consumer:cold_start_test
  • //deploy/private/release/tests:release_consumer_smoke_test

Change

.github/actions/gate now passes --test_tag_filters=-manual,-resources:nested_bazel:1,-starter-consumer,-network-consumer to dx.

  • For coverage, it puts coverage's own -no-coverage,-dx-no-coverage-collector in front, so neither filter is lost.
  • It applies on both pull_request and merge_group. ci-pr is only set on pull_request.
  • The filter lives in the action rather than .bazelrc, because a .bazelrc change widens --affected to //....

No tests are tagged and no budgets change. The nightly network job keeps running these tests. #14777 (a shared nested cache) and #14793 (one dx test per OS) bring them back into the gate once they are fast.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

The per-OS check and coverage jobs from #14772 run dx --affected without
the old pr-check exclusion, so the nested-Bazel consumer tests time out
in a 60 s small slot on every PR that touches them. A gate config
restores the manual, resources:nested_bazel:1, starter-consumer and
network-consumer exclusion and keeps coverage's own filters. The nightly
network job still runs them; #14793 brings them back into the gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 23, 2026
A .bazelrc change widens dx --affected to //..., so keep the filter in
the gate action instead of a .bazelrc config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

In run 45293932294, check (linux_x86_64) reports "6 tests did not run: a test filter removed //deploy/private/release/tests:release_consumer_smoke_test, //examples/adopt-polyglot:consumer_test, //tools/testing/consumer:cold_start_test and 3 more". The remaining failures (//core/modules:consumer_deps_test, //core/modules:versions_contract, the //cuda:pins.json substring check, and the windows_arm64 rules_dart pub fetch) also failed in the last run of #14772 (job 138070521405), so this change did not cause them.

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Review: approve

  • .github/actions/gate/action.yml:33-36,42: the filter is set for every event, including pull_request, merge_group and schedule, under shell: bash on all five OSes. The value has no /, so MSYS path conversion leaves it alone. It is passed last, so it overrides .bazelrc:6, and the coverage tags are kept. The tag set matches the query that pr-check.yml:127 used at 51d4be3^.
  • No non-nested tests are dropped. starter-consumer appears in no BUILD or .bzl file, and network-consumer only appears in tools/testing/nested_bazel.bzl:12, which also adds the nested tag. Coverage still filters the same 8 tests as ci: per-OS check and coverage jobs replace pr-check, pr-links and api-label #14772 (job 138070522000), because NESTED_BAZEL_TAGS already carries no-coverage. aggregate_gates_test.rs:452-467 still matches, and test_budget_test reads only BUILD files and ci.yml, not the action.
  • The failures were in the main baseline before this PR. Both check (linux_arm64) and coverage (linux_x86_64) fail on consumer_deps_test and versions_contract (//cuda:pins.json), with 6 or 8 tests removed by the filter and no TIMEOUTs. Windows arm64 fails on dart_pub__crypto. Three failures are not in the expected list, but they are unrelated: the clippy unfulfilled_lint_expectations at deploy/private/release/tests/release_consumer_test.rs:2 (also failed in ci: per-OS check and coverage jobs replace pr-check, pr-links and api-label #14772 job 138070522022), and on Windows x86_64 the shared-rust link failure (windows: fix consumer_inputs_test build, shared-rust link and arm64 Dart SDK #14774) and npm_hub_test.rs:68, which fails on the \ path separator.
  • The macOS jobs, check (windows_arm64), and coverage on linux_arm64 and windows_x86_64 were still pending when I reviewed.

🤖 Generated with Claude Code

@TrapsterDK
TrapsterDK marked this pull request as ready for review November 24, 2026 00:24
@TrapsterDK
TrapsterDK merged commit 8732b0f into main Nov 24, 2026
28 of 38 checks passed
@TrapsterDK
TrapsterDK deleted the fix-gate-nested-consumers branch November 24, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant