-
Notifications
You must be signed in to change notification settings - Fork 26.7k
build(bazel): prevent remote cache misses on dgeni build #48585
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
Conversation
Using 'always' as the stamp attribute caused stable-status.txt to always be included as an input, which has different values on different ci executors causing a cache miss. We run the regular aio build without stamping on ci so only include status files when stamping is explicitly enabled.
| exec_properties = ENABLE_NETWORK, | ||
| output_dir = True, | ||
| stamp = "@rules_nodejs//nodejs/stamp:always", | ||
| stamp = "@rules_nodejs//nodejs/stamp:use_stamp_flag", |
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.
This is actually the default, but I like to keep this here to indicate that this action makes use of stamping.
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.
Yay. Thanks!
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
Reviewed-for: global-dev-infra-approvers
|
This PR was merged into the repository by commit 8c9f067. |
Using 'always' as the stamp attribute caused stable-status.txt to always be included as an input, which has different values on different ci executors causing a cache miss. We run the regular aio build without stamping on ci so only include status files when stamping is explicitly enabled. PR Close #48585
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Using 'always' as the stamp attribute caused stable-status.txt to always be included as an input, which has different values on different ci executors causing a cache miss. We run the regular aio build without stamping on ci so only include status files when stamping is explicitly enabled. PR Close angular#48585
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The
test_aiostep always has a cache miss on//aio:dgeni.Using 'always' as the stamp attribute caused stable-status.txt to always be included as an input, which has different values on different ci executors causing a cache miss.
We run the regular aio build without stamping on ci so only include status files when stamping is explicitly enabled.
What is the new behavior?
Cache hit on ci. Note that this does not fix the caching issues for the
test_aio_localstep which must enable stamping for architect to work with local angular packages. I will look into those issues separately.Does this PR introduce a breaking change?
Other information
Note that even when there is a cache hit you will often see dgeni output in the ci logs. This is because Bazel also caches stdout and seeing this output does not indicate that dgeni is re-running. Outputting the json execution log confirms the cache hit.