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

Install setup-envtest utility if not exists #425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vaibhavjainwiz
Copy link

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vaibhavjainwiz
To complete the pull request process, please assign tjohnson31415 after the PR has been reviewed.
You can assign the PR to them by writing /assign @tjohnson31415 in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ckadner ckadner requested review from ckadner and removed request for joerunde September 5, 2023 17:40
@ckadner ckadner self-assigned this Sep 6, 2023
Copy link
Member

@ckadner ckadner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@ckadner ckadner assigned vaibhavjainwiz and unassigned ckadner Oct 10, 2023
@spolti
Copy link
Contributor

spolti commented Jan 9, 2024

@vaibhavjainwiz is this something that you will continue to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants