-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
proper versioning for setup-envtest #2646
Comments
/kind support |
There is a work around for this as main isn't versioned along with tools/setupenv-tools. I'm not sure the impact of now bundling the new tag you request for setup-envtest to coincide with the controller-runtime's release process. I'm not aware of anything needing to change which why this needs to be hard to coordinate this with the current release process. |
@troy0820 can i ask you why it isn't store in separate repository? I checked https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/go.sum and i don't see any dependencies to controller-runtime library. It can be easy manage this tool in separate repo and we can follow standard versioning for golang tools. |
@lukas016 I can't answer that question as I'm not a maintainer of controller-runtime. However, I believe this may have been a side effect of it having it's own go.mod and being embedded in this repository. There are ways to do multimodule version for releases and that may still be an option to satisfy this issue. |
@vincepri can ask you why setup-env is part of this repo and it doesn't have own repo? thx |
@alvaroaleman can we discuss proper versioning of setup-env with separate tags for keep compatibility with go install or maybe other options? |
I've also hit that issue and the workaround while working it's cumbersome to use. Ideally we'd be able to simply run The introduction of tags in the issue description would be a rather cheap way of achieving that (compared to let's say moved the tool to a separate repo and paying the maintenance costs of that). |
I've encountered the same issue, the method mentioned in this issue regarding tags is very simple and elegant. By synchronously creating the 'tools/setup-envtest/vX.Y.Z' tag, one can easily install it using |
Hey folks, Going forward we will start hosting the envtest binaries on controller-tools releases. We currently also plan to move setup-envtest to controller-tools as it fits better there. As part of that we will build & publish the setup-envtest binary on controller-tools releases in the future. This should also give proper versioning. |
@sbueringer could you pls keep compatibility with go install? I like this way. |
@lukas016 There are no plans to break go install (just has to be run against controller-tools instead of controller-runtime). |
Potentially this issue will just get rid of the additional module: #2790 Then setup-envtest can be automatically installed with the CR version and there would be no need to move it to the controller-tools repo. |
Not sure if this issue still relevant or not with the changes that went in or with the workaround in the comment that I mentioned. |
I think still okay to keep it open for now. I think two things would entirely solve it eventually
the 2nd one is on my TODO list, just not much bandwidth atm |
The second one is now implemented. Quoting my comment from another issue
/close |
@sbueringer: Closing this issue. 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-sigs/prow repository. |
…c setup - Installs ENVTEST binaries in the project’s `./bin/envtest` directory for isolation. - Configures `setup-envtest` binary to be downloaded based on the controller-runtime release version to ensure compatibility with the project’s dependencies. - Updates `suite_test.go` to dynamically locate and set the binary assets directory for seamless IDE debugging. - Introduces `getFirstFoundEnvTestBinaryDir` to detect ENVTEST binaries in the project directory when running tests outside the Makefile context. 1. **Ease of IDE Debugging**: - By setting the `BinaryAssetsDirectory` dynamically, contributors can debug tests in their preferred IDEs (e.g., GoLand, VSCode) without requiring additional environment configuration such as setting `KUBEBUILDER_ASSETS`. 2. **Project-Specific Binaries**: - Installing binaries inside the project avoids conflicts with other projects or system-wide installations, particularly useful for contributors with restricted environments (e.g., corporate laptops). 3. **Consistency**: - Using `setup-envtest` from the matching controller-runtime release avoids compatibility issues, such as those outlined in [#2744](kubernetes-sigs/controller-runtime#2744) and [#2646](kubernetes-sigs/controller-runtime#2646). 4. **Simplified Contributor Onboarding**: - New contributors often face a learning curve to: - Understand ENVTEST and its dependency on binaries. - Configure `KUBEBUILDER_ASSETS` manually. - Set up their IDE for debugging tests. - This setup minimizes friction and ensures tests can be run consistently across different environments. While setting `KUBEBUILDER_ASSETS` is sufficient for experienced contributors, this change makes it easier for newcomers and supports debugging directly in IDEs without additional configuration.
…c setup - Installs ENVTEST binaries in the project’s `./bin/envtest` directory for isolation. - Configures `setup-envtest` binary to be downloaded based on the controller-runtime release version to ensure compatibility with the project’s dependencies. - Updates `suite_test.go` to dynamically locate and set the binary assets directory for seamless IDE debugging. - Introduces `getFirstFoundEnvTestBinaryDir` to detect ENVTEST binaries in the project directory when running tests outside the Makefile context. 1. **Ease of IDE Debugging**: - By setting the `BinaryAssetsDirectory` dynamically, contributors can debug tests in their preferred IDEs (e.g., GoLand, VSCode) without requiring additional environment configuration such as setting `KUBEBUILDER_ASSETS`. 2. **Project-Specific Binaries**: - Installing binaries inside the project avoids conflicts with other projects or system-wide installations, particularly useful for contributors with restricted environments (e.g., corporate laptops). 3. **Consistency**: - Using `setup-envtest` from the matching controller-runtime release avoids compatibility issues, such as those outlined in [#2744](kubernetes-sigs/controller-runtime#2744) and [#2646](kubernetes-sigs/controller-runtime#2646). 4. **Simplified Contributor Onboarding**: - New contributors often face a learning curve to: - Understand ENVTEST and its dependency on binaries. - Configure `KUBEBUILDER_ASSETS` manually. - Set up their IDE for debugging tests. - This setup minimizes friction and ensures tests can be run consistently across different environments. While setting `KUBEBUILDER_ASSETS` is sufficient for experienced contributors, this change makes it easier for newcomers and supports debugging directly in IDEs without additional configuration.
Hi,
we have little problem with kubebuilder which using go install for installation of setup-envtest in latest version.
Using latest version creates unexpected problems with synchronization between developers.
It is possible little optimize and use branch name for installation the same minor version, but if we want to use really the same version, it isn't possible.
Main problem is with go install which requires own tag for every submodule.
Is possible start doing proper version for multimodule repository where tag contains path to submodule too?
Ideally if you create release v0.16.4, you will create tag tools/setup-envtest/v0.16.4 too.
The text was updated successfully, but these errors were encountered: