-
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
Unable to download env test config based on the tags #1670
Comments
c/c @varshaprasad96 |
/cc @varshaprasad96 |
@camilamacedo86 and you meant to use the actual tag value,
|
My organization's workaround for the problem is to specify a commit-ID-based version. For example: go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20211011193703-ffa8c5001e6a One way to determine that version string is to view the list of versions at the package documentation: https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest/versions?tab=versions Another way is to temporarily download "latest," and then watch for what Go reports that it really downloaded:
(In the above command, I clear However, I'm not aware of an easy way to determine "the setup-envtest commit best suited for working with controller-runtime version $x." I'm not sure that's required, though; they seem to be kinda independent of each other, so upgrading controller-runtime doesn't necessarily mean you also need to upgrade setup-envtest. See also #1659. |
the commit is not good enough. We need the tag that ought to match with the controller runtime release as well. |
We would have to bring this up in the community meeting, and have an action item for next release process. |
@varshaprasad96 , @vincepri |
Actually, this is a trick of go install with modules. It is because your project does not import the "sigs.k8s.io/controller-runtime/tools/setup-envtest", rather than controller-runtime doesn't have the setup-envtest in releases. It's easy to solve it:
//go:build tools
// +build tools
/*
YOUR_COPYRIGHT
*/
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools
import (
_ "sigs.k8s.io/controller-runtime/tools/setup-envtest"
)
|
@camilamacedo86 We can add the steps above into document, so that users can install setup-envtest with controller-runtime version they required. |
Hi @FillZpp, Thank you for your time and help on this. My concern/motivation to raise this one is that in Kubebuilder, we are: (here) ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) Then, a KB user scaffolds the project today. The scaffold is done with controller-runtime version X. Kubebuilder projects are scaffold with the go.mod and with the controller-runtime dep/version already. So, if I correctly understood your suggestion, we can sort it out by removing the latest and scaffolding the ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest) Then, it would install the setup-envtest module version accordingly to the controller-runtime version scaffold in the go.mod. It shows to address the need without asking the KB users to read the doc/steps. 👍 So, I am closing this one here and opening a KB issue to see if we can do that in this way. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: 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/test-infra repository. |
…ersion Currently, the Makefile use a specific commit SHA to target setup-envtest binary downloads. This change let install the setup-envtest version required from the controller-runtime version specified in go.mod see: kubernetes-sigs/controller-runtime#1670 (comment) Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
/reopen It still an issue see: kubernetes-sigs/kubebuilder#3715 |
@camilamacedo86: Reopened 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/test-infra repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". 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/test-infra repository. |
The documentation and its usage are telling us to use the latest version, however, we need to get the version based on the release tags. See:https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest
We cannot use the latest because it can change and have breaking changes and we need to ensure what version is compatible or not.
The text was updated successfully, but these errors were encountered: