Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Switch order of test and check-generated #2349

Merged
merged 1 commit into from Aug 12, 2019
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Aug 12, 2019

As test modifies go.mod and check-generated restores it,
ultimately restoring the git state to a clean working tree.

This is a hotfix as bin/helm/update_codegen.sh has only a limited
lifetime left in this repository.

#2344 follow up.

@hiddeco hiddeco added the build About the build or test scaffolding label Aug 12, 2019
As `test` modifies `go.mod` and `check-generated` restores it,
ultimately restoring the git state to a clean working tree.

This is a hotfix as `bin/helm/update_codegen.sh` has only a limited
lifetime left in this repository.
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 👍 for unblocking CI. We ought to figure out (if it's still a problem in fluxcd/helm-operator) how to remove the ordering dependency, as a follow-up. (We should probably also use -mod=readonly to make things fail if they need to modify go.mod).

@hiddeco
Copy link
Member Author

hiddeco commented Aug 12, 2019

Found the recipe to replicate the modification to go.mod locally:

$ GOPATH=/tmp make check-generated
$ GOPATH=/tmp make test
$ git diff go.mod
      1 diff --git a/go.mod b/go.mod
      2 index e76fb198..72a523f5 100644
      3 --- a/go.mod
      4 +++ b/go.mod
      5 @@ -22,6 +22,7 @@ require (
      6         github.com/go-logfmt/logfmt v0.4.0 // indirect
      7         github.com/gobwas/glob v0.2.3 // indirect
      8         github.com/gogo/googleapis v1.2.0 // indirect
      9 +       github.com/gogo/protobuf v1.2.1
     10         github.com/gogo/status v1.1.0 // indirect
     11         github.com/golang/gddo v0.0.0-20190312205958-5a2505f3dbf0
     12         github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5e // indirect
     13 @@ -66,6 +67,7 @@ require (
     14         golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect
     15         golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f
     16         golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
     17 +       gonum.org/v1/gonum v0.0.0-20190808205415-ced62fe5104b
     18         google.golang.org/api v0.3.2 // indirect
     19         google.golang.org/appengine v1.5.0 // indirect
     20         google.golang.org/grpc v1.20.0 // indirect

@hiddeco hiddeco merged commit b81da3b into master Aug 12, 2019
@hiddeco hiddeco deleted the build/check-generated branch August 12, 2019 09:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build About the build or test scaffolding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants