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

Add go.mod tidy CI check #323

Merged
merged 1 commit into from
May 25, 2021
Merged

Add go.mod tidy CI check #323

merged 1 commit into from
May 25, 2021

Conversation

wagoodman
Copy link
Contributor

Our go.mod should always be tidy --this PR adds a specific linting step to verify this on each PR.

This is important during the release step, where we run go mod download, which may change the go.sum (putting the workspace into an unreleasable state). The current workaround is to run go mod tidy to re-tidy the go.sum after the go mod download. This is OK, however, the assumption is that the go.mod and go.sum were in a tidy state before the download. If this isn't the case then the git state will still be dirty and the workspace will be in an unreleasable state.

Signed-off-by: Alex Goodman <[email protected]>
@wagoodman wagoodman requested a review from a team May 25, 2021 17:52
@wagoodman wagoodman self-assigned this May 25, 2021
@wagoodman wagoodman merged commit 7bdfffb into main May 25, 2021
@wagoodman wagoodman deleted the go-mod-release-workaround branch May 25, 2021 18:01
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 this pull request may close these issues.

2 participants