Skip to content
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

Need CI test that repo is not dirty after build+test #1083

Closed
danderson opened this issue Jan 3, 2021 · 2 comments · Fixed by #3382
Closed

Need CI test that repo is not dirty after build+test #1083

danderson opened this issue Jan 3, 2021 · 2 comments · Fixed by #3382
Assignees

Comments

@danderson
Copy link
Member

While trying to build reproducibly:

$ ./build_dist.sh -mod=readonly tailscale.com/cmd/tailscaled
go: updates to go.sum needed, disabled by -mod=readonly
$ ./build_dist.sh tailscale.com/cmd/tailscaled
$ git diff
+github.com/tailscale/wireguard-go v0.0.0-20201228234719-da0d2727455d h1:ha3qx0YBsEYM1VpLoAxVyLsz74H2a/Kv/id+2Bo/WLU=
+github.com/tailscale/wireguard-go v0.0.0-20201228234719-da0d2727455d/go.mod h1:FEGDKc5yHNWtTS5ugWnHMNF0d9LlaHv/zQwOrVogo2U=

Last commit was @josharian updating go.mod to a new wireguard-go version. I'm guessing he didn't do a build, and so go.sum wasn't updated. This leads to reproducibility sadness, because the git repo becomes dirty and so we embed a -dirty version even though we started out with a clean build (not to mention in the absence of the go.sum entry, there's a TOFU issue with the wireguard-go commit).

Maybe we should add a CI check that the git repo isn't dirty after the CI's done build+test?

Part of #779

@danderson
Copy link
Member Author

Fixed tailscale/tailscale by hand for now, by committing the changed go.sum. Leaving open to work out how to avoid this regression in future.

@josharian
Copy link
Contributor

Ugh. I only committed the changed go.mod because the corp push build script updated it, and I got tired of fighting the build script. Maybe that build script should update go.sum at the same time? Or have an option to not modify go.mod.

@danderson danderson self-assigned this Jan 3, 2021
@DentonGentry DentonGentry changed the title reproducibility: go.sum not up to date in oss repo Need CI test that repo is not dirty after build+test Sep 4, 2021
@josharian josharian self-assigned this Nov 22, 2021
josharian added a commit that referenced this issue Nov 22, 2021
Fixes #1083

Co-authored-by: Aaron Klotz <aaron@tailscale.com>
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
josharian added a commit that referenced this issue Nov 22, 2021
Linux-only for now, to avoid having to figure out why
powershell doesn't like my shell scripting. (Not that I blame it.)
That'll be enough to catch most regressions.

Fixes #1083

Co-authored-by: Aaron Klotz <aaron@tailscale.com>
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
josharian added a commit that referenced this issue Nov 22, 2021
Linux-only for now, to avoid having to figure out why
powershell doesn't like my shell scripting. (Not that I blame it.)
That'll be enough to catch most regressions.

Fixes #1083

Co-authored-by: Aaron Klotz <aaron@tailscale.com>
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants