-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run costly tests after only after merging #17956
Conversation
d26a272
to
471330d
Compare
e8035bc
to
e8aaef6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but for one minor question: do we really expect to have pr-only tests? What's the use-case for that?
This PR showcases one use case (simplified here):
That is: I want to only run the non-v2 tests against PRs, and all tests against main. Ideally I'd say "if running against PR, then pass the I'm not sure how else to express this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Wouldn't caching make the second run instant? Or would Bazel consider them separate tests and thus not reuse the cache? |
If I'm not mistaken they would be considered separate runs: it's the same binary, but with different flags: in one case the flag is "run all test cases", in the other case it's "run a subset of the test cases". But bazel is not aware of the semantics of the flags, so it doesn't know that one is the subset of the other. What I could do is have two tests that run exclusive subsets instead I guess. |
Context: #17812
Makes the necessary changes to
build.sh
,build.ps1
and the CI to run different tests on main after a merge vs against a PR. Changes two tests as a way to demonstrate the functionality.Will tag more tests in future PRs.