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
Bug 1999188: hack/verify-vendor.sh: clean module cache pre-test #5178
Conversation
go mod verify "checks that dependencies of the main module stored in the module cache have not been modified since they were downloaded." As these tests are running in a container, it the contents of that cache seem arbitrary. By adding go clean -modcache we can clear the cache before testing to ensure a fresh start and that go mod verify is not complaining about altering contents that should be removed. [0] https://golang.org/ref/mod#go-mod-verify
@LorbusChris @abhinavdahiya your input would be valuable here, as I think you have a good understanding of go vendoring. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@patrickdillon to me it looks like the issue in the failing verify test on #5120 is the git diff that was found. Running and committing Clearing the cache does make sense if that's not done at build time, wouldn't fix the above, though. |
/retitle Bug 1999188: hack/verify-vendor.sh: clean module cache pre-test |
@patrickdillon: This pull request references Bugzilla bug 1999188, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (gpei@redhat.com), skipping review request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@patrickdillon: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Thanks for sanity checking this. You are correct. I thought we already tried your suggestion (both locally and in the PR), but it definitely works when trying it again. So this PR is unnecessary. /close |
@patrickdillon: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@patrickdillon: This pull request references Bugzilla bug 1999188. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
go mod verify
"checks that dependencies of the mainmodule stored in the module cache have not been
modified since they were downloaded." As these tests
are running in a container, it the contents of that
cache seem arbitrary.
By adding go clean -modcache we can clear the cache
before testing to ensure a fresh start and that
go mod verify
is not complaining about alteringcontents that should be removed.
The cache seems to cause an issue in #5120. When updating to go 1.16 and then running hack/verify-vendor.sh, the test fails on
go mod verify
as some files have been (correctly) removed: