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
✨ Enable using setup-envtest without a separate CLI #2810
base: main
Are you sure you want to change the base?
✨ Enable using setup-envtest without a separate CLI #2810
Conversation
Since the error handling in the setup-envtest executable main path is built on panics, recovers and os.Exit, it isn't ideal for re-using in a version that downloads binaries within the test run. However, much of the heavy lifting is performed by the remote, store and versions packages, which _do_ properly return errors, and can readily be reused in a new implementation. This commit just duplicates the code from under tools/setup-envtest to pkg/envtest, where we can build a new entry point that is easier to use from within tests.
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tomasaschan 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 |
PR needs rebase. 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. |
Some options might be missing...
This also removes the last references to the old env package!
Also ensure binDir option is used in all workflows
a12a6c3
to
b3a4f85
Compare
I will rebase this properly once #2811 merges, since I expect conflicts with that anyway. |
This implements the proposal in #2790.
The implementation is incomplete so far; opening this mostly to show my progress and solicit feedback, as well as to avoid too many conflicts with initiatives like this one.
To do:
use
in the main modulelist
in the main modulecleanup
in the main modulesideload
in the main modulesetup-envtest
module, removing duplicated code etcafero
go.mod
since I branched off