replicatedhq / ship

A better way to deploy Kubernetes Helm charts
https://www.replicated.com/ship
Apache License 2.0
637 stars 70 forks source link

Bump gomock to 1.4.4 #1126

Closed jnozsc closed 4 years ago

jnozsc commented 4 years ago

What I Did

bump gomock to 1.4.4

How I Did it

./get_build_deps.sh

How to verify it

build from the source

Description for the Changelog

Picture of a Ship (not required but encouraged)

laverya commented 4 years ago

What is this intended to fix?

jnozsc commented 4 years ago

the build fails from homebrew https://github.com/Homebrew/homebrew-core/pull/59242

you can check the build log here https://github.com/Homebrew/homebrew-core/pull/59242/checks?check_run_id=954897866

the error traceback looks like

2020-08-07T06:25:29.1880240Z time ./hack/get_build_deps.sh
2020-08-07T06:25:29.1880410Z 
2020-08-07T06:25:29.1880650Z go get github.com/golang/mock/gomock
2020-08-07T06:25:29.1881110Z go: downloading github.com/golang/mock v1.4.4
2020-08-07T06:25:29.1881700Z go: found github.com/golang/mock/gomock in github.com/golang/mock v1.4.4
2020-08-07T06:25:29.1882900Z go: github.com/golang/mock upgrade => v1.4.4
2020-08-07T06:25:29.1883100Z go install github.com/golang/mock/mockgen
2020-08-07T06:25:29.1883820Z go: downloading golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c
2020-08-07T06:25:29.1884430Z go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs
2020-08-07T06:25:29.1885600Z go: downloading github.com/elazarl/go-bindata-assetfs v1.0.1
2020-08-07T06:25:29.1887080Z go: found github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs in github.com/elazarl/go-bindata-assetfs v1.0.1
2020-08-07T06:25:29.1887820Z GO111MODULE=off go get -u github.com/jteeuwen/go-bindata/go-bindata
2020-08-07T06:25:29.1887930Z 
2020-08-07T06:25:29.1888040Z real   0m15.697s
2020-08-07T06:25:29.1888180Z user   0m8.407s
2020-08-07T06:25:29.1888290Z sys    0m8.455s
2020-08-07T06:25:29.1888910Z export PATH=/Users/brew/Library/Caches/Homebrew/go_mod_cache/bin:$PATH; go-bindata-assetfs -pkg daemon \
2020-08-07T06:25:29.1889810Z      -o pkg/lifecycle/daemon/ui.bindatafs.go \
2020-08-07T06:25:29.1890720Z      -prefix web/app \
2020-08-07T06:25:29.1891160Z      web/app/build/...
2020-08-07T06:25:29.1891390Z go build \
2020-08-07T06:25:29.1892480Z        -mod vendor \
2020-08-07T06:25:29.1894180Z        -ldflags " -X github.com/replicatedhq/ship/pkg/version.version=0.54.0 -X github.com/replicatedhq/ship/pkg/version.gitSHA="" -X github.com/replicatedhq/ship/pkg/version.buildTime=`date -u +"%Y-%m-%dT%H:%M:%SZ"` -X github.com/replicatedhq/ship/pkg/version.helm=v2.14.1 -X github.com/replicatedhq/ship/pkg/version.kustomize=v2.0.3 -X github.com/replicatedhq/ship/pkg/version.terraform=v0.11.14 " \
2020-08-07T06:25:29.1895310Z        -i \
2020-08-07T06:25:29.1896260Z        -o bin/ship \
2020-08-07T06:25:29.1896520Z        ./cmd/ship
2020-08-07T06:25:29.1898060Z go: inconsistent vendoring in /private/tmp/ship-20200807-11723-bt726t/ship-0.54.0:
2020-08-07T06:25:29.1898930Z    github.com/golang/mock@v1.4.4: is explicitly required in go.mod, but vendor/modules.txt indicates github.com/golang/mock@v1.4.3
2020-08-07T06:25:29.1899230Z 
2020-08-07T06:25:29.1900470Z run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory
2020-08-07T06:25:29.1900770Z make: *** [bin/ship] Error 1

the get_build_deps.sh will pull down the latest version of some deps, then go.mod and vendor will not match. I recommend for short term solution, bump the gomock version, for long term solution, pin the deps version and get rid of get_build_deps.sh

laverya commented 4 years ago

Or just add go mod vendor to get_build_deps.sh, too

jnozsc commented 4 years ago

yes, I like the solution, I can append it to my PR

laverya commented 4 years ago

I'll make a ship release once I fixup the integration tests downside of relying on 3rd party helm charts for your test suite - it ends up depressingly flaky ☹️