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

CAAPH: don't pin kubebuilder envtest version #32803

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mboersma
Copy link
Contributor

Removes the hard-coded version for KUBEBUILDER_ENVTEST_KUBERNETES_VERSION since it seems to be causing a failure in CAAPH when updating envtest itself (see kubernetes-sigs/cluster-api-addon-provider-helm#255).

Testing locally without this change:

% KUBEBUILDER_ENVTEST_KUBERNETES_VERSION=1.20.0 ./scripts/ci-test.sh 
*** Testing Cluster API Add-on Provider for Helm ***
GOBIN=/Users/matt/projects/cluster-api-addon-provider-helm/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20240522175850-2e9781e9fc60
unable to fetch hash for requested version: unable to find archive for 1.20.0 (darwin,arm64)
KUBEBUILDER_ASSETS="" go test ./... 
?   	sigs.k8s.io/cluster-api-addon-provider-helm	[no test files]
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1	0.447s
?   	sigs.k8s.io/cluster-api-addon-provider-helm/hack/boilerplate/test	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal/mocks	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/version	[no test files]
Running Suite: Controller Suite - /Users/matt/projects/cluster-api-addon-provider-helm/controllers
==================================================================================================
Random Seed: 1718920653

Will run 1 of 1 specs
E0620 15:57:33.721032   12228 server.go:317] "unable to start the controlplane" err="exec: \"etcd\": executable file not found in $PATH" logger="controller-runtime.test-env" tries=0
E0620 15:57:33.721742   12228 server.go:317] "unable to start the controlplane" err="exec: \"etcd\": executable file not found in $PATH" logger="controller-runtime.test-env" tries=1
...
FAIL! -- A BeforeSuite node failed so all tests were skipped.
--- FAIL: TestControllers (0.04s)
FAIL
FAIL	sigs.k8s.io/cluster-api-addon-provider-helm/controllers	1.432s
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmchartproxy	0.918s
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmreleaseproxy	0.488s
FAIL
make: *** [test] Error 1

Testing locally with no env var set:

% ./scripts/ci-test.sh 
*** Testing Cluster API Add-on Provider for Helm ***
KUBEBUILDER_ASSETS="/Users/matt/Library/Application Support/io.kubebuilder.envtest/k8s/1.29.0-darwin-arm64" go test ./... 
?   	sigs.k8s.io/cluster-api-addon-provider-helm	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/hack/boilerplate/test	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal/mocks	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/version	[no test files]
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmchartproxy	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmreleaseproxy	(cached)

cc: @Jont828

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. area/config Issues or PRs related to code in /config area/jobs sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jun 20, 2024
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 20, 2024
@mboersma
Copy link
Contributor Author

/assign @Jont828

@Jont828
Copy link
Contributor

Jont828 commented Jun 21, 2024

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 21, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jont828, mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot merged commit 36bb8f5 into kubernetes:master Jun 21, 2024
7 checks passed
@k8s-ci-robot
Copy link
Contributor

@mboersma: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key cluster-api-addon-provider-helm-presubmits-main.yaml using file config/jobs/kubernetes-sigs/cluster-api-addon-provider-helm/cluster-api-addon-provider-helm-presubmits-main.yaml

In response to this:

Removes the hard-coded version for KUBEBUILDER_ENVTEST_KUBERNETES_VERSION since it seems to be causing a failure in CAAPH when updating envtest itself (see kubernetes-sigs/cluster-api-addon-provider-helm#255).

Testing locally without this change:

% KUBEBUILDER_ENVTEST_KUBERNETES_VERSION=1.20.0 ./scripts/ci-test.sh 
*** Testing Cluster API Add-on Provider for Helm ***
GOBIN=/Users/matt/projects/cluster-api-addon-provider-helm/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20240522175850-2e9781e9fc60
unable to fetch hash for requested version: unable to find archive for 1.20.0 (darwin,arm64)
KUBEBUILDER_ASSETS="" go test ./... 
?   	sigs.k8s.io/cluster-api-addon-provider-helm	[no test files]
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1	0.447s
?   	sigs.k8s.io/cluster-api-addon-provider-helm/hack/boilerplate/test	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal/mocks	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/version	[no test files]
Running Suite: Controller Suite - /Users/matt/projects/cluster-api-addon-provider-helm/controllers
==================================================================================================
Random Seed: 1718920653

Will run 1 of 1 specs
E0620 15:57:33.721032   12228 server.go:317] "unable to start the controlplane" err="exec: \"etcd\": executable file not found in $PATH" logger="controller-runtime.test-env" tries=0
E0620 15:57:33.721742   12228 server.go:317] "unable to start the controlplane" err="exec: \"etcd\": executable file not found in $PATH" logger="controller-runtime.test-env" tries=1
...
FAIL! -- A BeforeSuite node failed so all tests were skipped.
--- FAIL: TestControllers (0.04s)
FAIL
FAIL	sigs.k8s.io/cluster-api-addon-provider-helm/controllers	1.432s
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmchartproxy	0.918s
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmreleaseproxy	0.488s
FAIL
make: *** [test] Error 1

Testing locally with no env var set:

% ./scripts/ci-test.sh 
*** Testing Cluster API Add-on Provider for Helm ***
KUBEBUILDER_ASSETS="/Users/matt/Library/Application Support/io.kubebuilder.envtest/k8s/1.29.0-darwin-arm64" go test ./... 
?   	sigs.k8s.io/cluster-api-addon-provider-helm	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/hack/boilerplate/test	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/internal/mocks	[no test files]
?   	sigs.k8s.io/cluster-api-addon-provider-helm/version	[no test files]
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/api/v1alpha1	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmchartproxy	(cached)
ok  	sigs.k8s.io/cluster-api-addon-provider-helm/controllers/helmreleaseproxy	(cached)

cc: @Jont828

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.

@mboersma mboersma deleted the caaph-dont-pin-envtest branch June 21, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/config Issues or PRs related to code in /config area/jobs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants