This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Use cache instead of vendor#959
Closed
antechrestos wants to merge 1 commit intoGoogleContainerTools:masterfrom
antechrestos:feature/use_cache_instead_of_vendor_directory
Closed
Use cache instead of vendor#959antechrestos wants to merge 1 commit intoGoogleContainerTools:masterfrom antechrestos:feature/use_cache_instead_of_vendor_directory
antechrestos wants to merge 1 commit intoGoogleContainerTools:masterfrom
antechrestos:feature/use_cache_instead_of_vendor_directory
Conversation
This change aims to remove vendor directory in order to add more flexibility to changes in dependency versions but keep it for CI purpose
Contributor
|
@antechrestos Thank you for your PR.
Thanks |
Contributor
Author
|
Thank you for your feedback.
Ben |
Contributor
|
I'm not sure I follow the intent of this PR. Can we open an issue to discuss this further? |
Contributor
|
@antechrestos At this time, i don't mind reviewing the larger diffs when dependencies are added Vs adding additional maintenance load of updating the travis cache. In future we can re-evaluate this decision. Thanks |
Contributor
Author
|
@tejal29 Thank you for this feedback 😄 . Cheers |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This work is a proposal. In another pull request, I had more than 1K files modified just by changing a dependency version.
I took sight it might also be a good way to introduce an undesired/unhandled/malicious modification in vendor files as currently travis does not check consistency between
vendordirectory andgo.modfile.In this change I did the following things
vendordirectory.travis/go-cachedirectory: to create this, I cleaned my own cache directory (go clean --modcache), deleted thevendordirectory, and did ago mod vendor. Then I created the.travis/go-cachedirectory from$GOPATH/pkg/moddirectory.travis.yml,integration-test.shto copy cache to$GOPATH/pkg/modbefore running ago mod vendorDEVELOPMEND.mdfile to tell any neww developer to run ago mod vendorafter cloning repository.hack/boilerplate.shandhack/gofmt.shto ignore the.travisdirectoryvendordirectory to the.gitignorefileI cut my laptop from network and made a
cp -r ./.travis/go-cache $GOPATH/pkg/mod && go mod vendor && make out/executorand it worked perfectly.This way, it may be a good thing to let the core team be the protector of the
.travis/go-cachedirectory (pull requests will download new dependencies in their jobs but cache will be updated by core team once it is merged).What do you think of it @cvgw @tejal29 ?
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes