Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore(ci): conditionally stamp genrules#63204

Merged
jhchabran merged 2 commits into
mainfrom
jh/bzl/cond-stamp
Jun 12, 2024
Merged

chore(ci): conditionally stamp genrules#63204
jhchabran merged 2 commits into
mainfrom
jh/bzl/cond-stamp

Conversation

@jhchabran

@jhchabran jhchabran commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

See https://github.com/bazelbuild/bazel/releases/tag/7.1.0 which introduces a new value for the stamp attribute for genrule: stamp = -1 which makes the stamping conditional.

Previously, any genrule that had stamp = 1 would be stamping all the time due to how it was implemented prior 7.1. An as we stamp builds with a computed version that is date dependent, we would never get cache hits on those, leading to //cmd/migrator:image_test being executed all the time. It wasn't that big of an issue as it's rather quick, but still.

Now the genrule supports that there's no reason to fix that one.

Test plan

CI

Changelog

  • Avoid invalidating cache in stamped genrules on dev builds.

@cla-bot cla-bot Bot added the cla-signed label Jun 11, 2024
@jhchabran jhchabran marked this pull request as ready for review June 12, 2024 12:42
@jhchabran jhchabran requested a review from a team June 12, 2024 12:55
@jhchabran jhchabran merged commit fa7fce5 into main Jun 12, 2024
@jhchabran jhchabran deleted the jh/bzl/cond-stamp branch June 12, 2024 13:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants