Installing tools using commit specification bypassing go.mod and vendoring #2561
Labels
area/testing
Issues related to testing kaniko itself
kind/enhancement
New feature or request
meta/kaniko
priority/p2
High impact feature/bug. Will get a lot of users happy
Actual behavior
golang/go#48332 explains how installing tools using
go install <tool>@<version>
can result in strange and inconsistent behavior where the version of libraries do not match what is present ingo.mod
andgo.sum
.The project recently ran afoul of problems related to this.
Expected behavior
Install tools without using
@<version>
tagging in the command. Instead, use placeholder imports to make the module system track tools dependency versions ingo.mod
andgo.sum
and callgo install <tool>
. This lets thedependencies and transitive dependencies versions be controlled using
go.mod
andgo.sum
as would reasonably be expected.To Reproduce
Steps to reproduce the behavior:
The above command does not use the local
vendor
orgo.mod
, instead downloading from the external project's repo and doing the same for all dependencies of that project.Compare to the behavior of #2562. The call to
go install github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
uses the localgo.mod
andgo.sum
along with the locally storedvendor
ed dependencies.Additional Information
Please provide either the Dockerfile you're trying to build or one that can reproduce this error.
Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: