mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
chore(ci): conditionally stamp genrules (#63204)
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 <!-- All pull requests REQUIRE a test plan: https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> CI ## Changelog - Avoid invalidating cache in stamped genrules on dev builds.
This commit is contained in:
parent
bce9eeeb7c
commit
fa7fce585c
@ -63,7 +63,7 @@ genrule(
|
||||
tar -cf $@ --owner=:0 --group=:0 --numeric-owner schema-descriptions/
|
||||
fi
|
||||
""",
|
||||
stamp = 1,
|
||||
stamp = -1,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ genrule(
|
||||
tar -cf $@ --owner=:0 --group=:0 --numeric-owner schema-descriptions/
|
||||
fi
|
||||
""",
|
||||
stamp = 1,
|
||||
stamp = -1,
|
||||
tags = ["requires-network"],
|
||||
tools = [":airgappedgen"],
|
||||
visibility = ["//cmd/migrator:__subpackages__"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user