[build] Improve CI speed and add job timeouts#17590
Closed
AutomatedTester wants to merge 1 commit into
Closed
Conversation
- Merge check+read-targets into a single native job in ci.yml, skipping
the full bazel.yml setup (disk-free, setup-bazel, disk-checks) for
what is essentially a shell script. Saves 3-5 min off the critical
path on every PR by eliminating one job + one artifact upload/download.
- Remove needs:build from Ruby lint so lint and build run in parallel,
matching the Python pattern already in place.
- Add timeout-minutes input to bazel.yml (default 60) and set explicit
limits per caller: 15-20 min for lint/build, 30 min for unit tests,
90 min for browser/integration tests. Prevents hung runners from
holding concurrency slots for 6 hours.
- Merge Rust {windows,linux,macos}-{stable,debug} into three combined
build jobs that produce both artifacts in one runner, halving the
platform build fan-out from 6 jobs to 3 and sharing toolchain setup.
Member
|
Most of this doesn't do what we need and is mistaken in a few places. Things are a lot better optimized than the AI agent thinks they are. The only we'll actually move the needle on CI speed is to stop running tests that aren't providing value (#17539). The specifics on this PR:
|
Member
|
I'm with @titusfortner on this. No one has spent more time optimizing the build than him, and some of these changes are overriding changes he has made. I don't think we need to merge this. |
Member
SM is quite stable now, so the debug artifacts are not strictly required. We can stop generating them, IMO. |
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.
Summary
check+read-targetsinto a single native job (ci.yml): the affected-targets detection is a shell script that reads a cached index file — it doesn't need the fullbazel.ymlsetup (free-disk-space, setup-bazel, disk-checks, artifact upload/download). Collapsing these two sequential jobs into one native job saves ~3–5 min off the critical path on every PR.needs: buildfrom Rubylint(ci-ruby.yml): lint runs./go rb:lintwhich is source-level analysis and doesn't need the compiled artifacts. Now runs in parallel with build, matching the Python pattern.timeout-minutestobazel.yml(default 60) with per-caller overrides: 15 min for lint, 20 min for builds, 30 min for unit tests, 90 min for browser/integration tests. Prevents hung browser tests from holding a runner for 6 hours (the GitHub Actions default).ci-rust.yml): consolidate{windows,linux,macos}-{stable,debug}from 6 jobs into 3 combined jobs that build both profiles in one runner, sharing toolchain setup and halving the fan-out.Test plan
Check Targetsjob completes without Bazel setup (check the job log — no "Setup Bazel" step should appear)lintandbuildstart at the same time on a Ruby PRWindows (stable + debug),Linux (stable + debug),MacOS (stable + debug)jobs instead of 6 separate jobsselenium-manager-windows,selenium-manager-windows-debug, etc.)ci-successstill passes when non-affected language jobs are skipped