ci(bazel): harden detect matching + cap matrix concurrency#425
Merged
Conversation
Two fixes for the change-aware detect job restored in #424: 1. Replace `printf ... | grep -q` with a here-string (`grep -q PATTERN <<<"$changed"`). Under `set -o pipefail`, grep -q closes the pipe on its first match and printf can take SIGPIPE (141); pipefail then makes the pipeline non-zero, so a real match reads as no-match and the subtree is silently dropped from the matrix. The here-string removes the pipe. (CodeRabbit finding on #424.) 2. Add max-parallel: 8 to the bazel matrix. A full matrix otherwise starts ~20 jobs at once and every runner pulls actions/checkout from codeload.github.com in the same instant, tripping GitHub's action download rate limit (HTTP 429 in Set up job). Batching keeps the burst under the limit; change-aware scheduling keeps most PRs below the cap. Co-authored-by: Balaji Ganesan <bganesan@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Bazel workflow updates changed-file matching in the ChangesBazel workflow scheduling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- Add max-parallel to the bazel-docker matrix so the docker-host rows do not add to the simultaneous actions/checkout burst (companion to the cap on the container bazel job). - Rename the aggregate gate job from "bazel verification" to "bazel required checks" so it is recognizable as the single status check to require for merge. Under change-aware scheduling the individual bazel (<service>) rows are dynamic and must not be required; this always-run rollup is the stable gate. Co-authored-by: Balaji Ganesan <bganesan@nvidia.com>
kristinapathak
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two follow-ups to the change-aware detect job restored in #424:
printf ... | grep -qunderset -o pipefailcan misfire:grep -qcloses the pipe on its first match,printfcan take SIGPIPE (141), and pipefail then makes the whole pipeline non-zero. In anif, a real match reads as no-match, so a subtree gets silently dropped from the matrix. This is the exact "tests skipped without anyone noticing" failure mode we are trying to prevent.actions/checkoutfromcodeload.github.comsimultaneously, tripping GitHub's action-download rate limit (HTTP 429 in "Set up job"). This has been failing docs-era PRs (docs: update 0.6.1 release candidate manifest #423) and re-runs.What changed
printf '%s\n' "$changed" | grep -q ...sites with a here-string (grep -q PATTERN <<<"$changed"). No pipe, no SIGPIPE, no pipefail interaction. Theawkpipelines are unaffected (awk drains stdin, never early-exits).max-parallel: 8to thebazelmatrix so the checkout burst stays under the rate limit. Change-aware scheduling keeps most PRs below the cap; full-matrix events (a workflow change, main push, workflow_dispatch) run in batches.Customer Release Notes
Not customer visible (CI-only).
Testing
YAML validated; confirmed no
printf | grep -qremain and here-strings preserve the existing anchored patterns.References
Follow-up to #424. CodeRabbit review comment on that PR.
Summary by CodeRabbit