test: Tag nested expect_* tests no-sandbox instead of local - #1907
Draft
bor-p-s wants to merge 2 commits into
Draft
test: Tag nested expect_* tests no-sandbox instead of local#1907bor-p-s wants to merge 2 commits into
bor-p-s wants to merge 2 commits into
Conversation
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.
Description
A probe for a CI number and a direction; the branch is throwaway.
The nested
expect_*tests default totags = ["local", ...]. Measured here,localdoes more than drop the sandbox: it also keeps the action out of the shared cache. Buildkite already runs us with--remote_cache=https://storage.googleapis.com/bazel-untrusted-build-cache, which serves the rest of the suite, so these tests re-run on every build.Over builds 6400 to 6499 the
bazel test //...step serves 137 of 190 tests from cache, and the./test_rules_scalasteps serve zero. The tree holds 58 nested tests and 53 of the 190 come back uncached, so the uncached set is essentially them. They also make the test phase serial:Critical PathequalsElapsed, about 19 minutes.no-sandboxkeeps them unsandboxed, which is the part they need, and leaves them eligible for the cache. On 6 nested tests covering all four macro kinds, with two output bases sharing one--disk_cache: 85s on the first run, then all 6(cached) PASSEDin 8.9s.The open question
These tests declare their own package,
MODULE.bazeland the driver as inputs, while the nestedbazelreads the whole workspace, so the cache key is narrower than the real dependency. After editingscala/scala.bzlthe same tests still came back(cached). That window is open today too, within one output base; this widens it to everything sharing the remote cache.Closing it and getting CI hits pull against each other: a key covering everything the nested build reads changes with every commit, so every CI build would recompute.
Two ways out. Declare the ruleset sources, which means a
filegroupper package sinceglobstops at package boundaries, so 45 of them. Or make the nested build read a declared copy from runfiles instead of the real tree, which also removes the reason for the shared output base and with it the lock contention thatexclusive(#1894) works around. The first is the first half of the second anyway.Worth agreeing on the direction before spending the 45 filegroups. If CI shows the win is small, the question goes away.