Install setup-envtest utility if not exists#425
Install setup-envtest utility if not exists#425vaibhavjainwiz wants to merge 1 commit intokserve:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vaibhavjainwiz The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Vaibhav Jain <vajain@redhat.com>
73c1b5a to
f3a34a8
Compare
ckadner
left a comment
There was a problem hiding this comment.
@vaibhavjainwiz -- thanks for your PR. It definitely makes sense to auto-install missing dependencies.
Introducing a local bin directory is a good best practice to avoid system-wide side effects. However, we already have an established precedent for using the GOBIN to install required CLIs. Both for the Makefile as well as in Dockerfile.develop.
When I tested your changes, I ran into an issue when running make test (which creates the local bin/setup-envtest) and then run make run test inside the developer container:
test -s /workspace/bin/setup-envtest || GOBIN=/workspace/bin go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
/workspace/bin/setup-envtest: /workspace/bin/setup-envtest: cannot execute binary file
Though the developer container already has a "global" setup-envtest binary in GOBIN.
So, we should either stick with GOBIN instead of a LOCALBIN or do some extra checking for existing CLIs already available in the current environment.
|
@vaibhavjainwiz is this something that you will continue to work? |
#424