[tailscale] cmd/go: include tailscale.toolchain.rev in build cache salt#167
Merged
bradfitz merged 1 commit intotailscale.go1.26from Apr 6, 2026
Merged
[tailscale] cmd/go: include tailscale.toolchain.rev in build cache salt#167bradfitz merged 1 commit intotailscale.go1.26from
bradfitz merged 1 commit intotailscale.go1.26from
Conversation
The Tailscale Go fork's VERSION file matches upstream (e.g. "go1.26.1"), so Go's build cache, keyed by runtime.Version(), doesn't invalidate when the fork is patched without a version bump. This can cause stale binaries to be served from cache even after a toolchain fix. Read the tailscale.toolchain.rev build setting (already populated by CI and Nix via sed replacement of the placeholder in runtime/debug/mod.go) and append it to the cache hash salt. When the placeholder hasn't been replaced (local dev builds, upstream Go), the salt is unchanged. Updates #166 Updates tailscale/corp#36589 Updates tailscale/tailscale#19263 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
a8e651e to
90ac956
Compare
nickkhyl
approved these changes
Apr 6, 2026
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.
The Tailscale Go fork's VERSION file matches upstream (e.g. "go1.26.1"),
so Go's build cache, keyed by runtime.Version(), doesn't invalidate when
the fork is patched without a version bump. This can cause stale
binaries to be served from cache even after a toolchain fix.
Read the tailscale.toolchain.rev build setting (already populated by CI
and Nix via sed replacement of the placeholder in runtime/debug/mod.go)
and append it to the cache hash salt. When the placeholder hasn't been
replaced (local dev builds, upstream Go), the salt is unchanged.
Updates #166
Updates tailscale/corp#36589
Updates tailscale/tailscale#19263