Some fixes for "make vendor"#3412
Merged
thaJeztah merged 2 commits intodocker:masterfrom Jan 28, 2022
Merged
Conversation
There was some debate about this, and wether or not tidy should be run when vendoring, but without this, validation failed after running `make vendor`, and manually doing a `go mod tidy` is complicated (due to the `vendor.mod`, and because the cache is not inside the build-cache, not on the host). Signed-off-by: Sebastiaan van Stijn <[email protected]>
While the module proxy can speed up vendoring, it may cause issues when
(temporarily) vendoring from a fork, because the proxy may not have the
module yet on first try, which causes vendoring to fail:
vendor.mod:95:2: replace github.com/thaJeztah/compose-on-kubernetes:
version "0b59cf047b3b0199048fe13fdcd21b0cb46549f2" invalid:
Get "https://proxy.golang.org/github.com/tha%21jeztah/compose-on-kubernetes/@v/0b59cf047b3b0199048fe13fdcd21b0cb46549f2.info": read tcp 172.17.0.2:60290->172.217.168.209:443: read: connection reset by peer
Using `GOPROXY=direct` to fetch sources directly from upstream (GitHub) instead.
Signed-off-by: Sebastiaan van Stijn <[email protected]>
crazy-max
approved these changes
Jan 28, 2022
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.
scripts/vendor: run go mod tidy when vendoring
There was some debate about this, and wether or not tidy should be run
when vendoring, but without this, validation failed after running
make vendor, and manually doing ago mod tidyis complicated(due to the
vendor.mod, and because the cache is not inside thebuild-cache, not on the host).
Dockerfile.vendor: use GOPROXY=direct
While the module proxy can speed up vendoring, it may cause issues when
(temporarily) vendoring from a fork, because the proxy may not have the
module yet on first try, which causes vendoring to fail:
Using
GOPROXY=directto fetch sources directly from upstream (GitHub) instead.