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

Run "go mod vendor" in verify-gomod #9389

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Jun 18, 2020

This will actually catch vendoring issues.

also removing it from make travis-ci because make gomod depends on bazel which isnt available in travis. make gomod has its own prow job though, so we still get sufficient coverage.

This will actually catch vendoring issues
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 18, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 18, 2020
@rifelpet
Copy link
Member Author

/test pull-kops-verify-gomod

@justinsb
Copy link
Member

Whoops! Thanks for catching this mistake I made :-)

I know it's WIP, but looks good so far!

@rifelpet
Copy link
Member Author

It looks like go is still downloading the modules into the mod cache rather than using the vendor directory. I'm sure theres an env var that we can set in the Makefile to tell go to use the vendor directory every time, and that this default behavior changed between 1.13 and 1.14. k/k is still on 1.13 but is hoping to upgrade to 1.14 for k8s 1.19, so maybe we just follow suit once that lands and our jobs should start using the vendor directory automatically.

regardless, that can be in a followup PR

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 18, 2020
@rifelpet
Copy link
Member Author

/test pull-kops-verify-gomod

@rifelpet rifelpet marked this pull request as ready for review June 18, 2020 03:39
@rifelpet rifelpet changed the title WIP Run "go mod vendor" in verify-gomod Run "go mod vendor" in verify-gomod Jun 18, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2020
@hakman
Copy link
Member

hakman commented Jun 18, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 18, 2020
@justinsb
Copy link
Member

Thanks @rifelpet . I believe the flag is mod=vendor, and it can be passed to each go invocation or simply set with export GOFLAGS=-mod=vendor.

@k8s-ci-robot k8s-ci-robot merged commit ae4ff31 into kubernetes:master Jun 18, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jun 18, 2020
k8s-ci-robot added a commit that referenced this pull request Jun 18, 2020
…89-upstream-release-1.18

Automated cherry pick of #9389: Run "go mod vendor" in verify-gomod
@rifelpet rifelpet deleted the verify-gomod branch October 29, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants