-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications from Dependency Updates
Upgrading to k8s 1.27 required a similar update to the version Envtest simulates. While testing this locally, I discovered that the latest branch of the setup-envtest tool requires golang 1.22. Using the older `release-0.17` branch bypasses this issue for now. After the update, some of the tests in `TestShipwrightBuildReconciler_Reconcile` fail permanently. These were previously marked as "brittle" because they used separate k8s test clientsets. These tests are now skipped, resulting in loss of test coverage related to operand image overrides. A refactor is in order to ensure we only use the controller-runtime clientsets. This should come after the upgrade to operator-sdk, which will require a restructure of the project. The update also exposed a latent bug in our controller logic, related to updating the ShipwrightBuild object status. We previously were not requeing on error, which in production can happen for a wide variety of reasons. This bug was in fact caught by a lint check that was skipped; this bypass has been removed to ensure we don't regress in the future.
- Loading branch information
1 parent
b345250
commit 811604b
Showing
3 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,7 @@ endif | |
# Image URL to use all building/pushing image targets | ||
IMG ?= $(IMAGE_TAG_BASE):$(TAG) | ||
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. | ||
ENVTEST_K8S_VERSION = 1.26 | ||
ENVTEST_K8S_VERSION = 1.27 | ||
|
||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) | ||
ifeq (,$(shell go env GOBIN)) | ||
|
@@ -212,10 +212,12 @@ KUSTOMIZE = $(shell pwd)/bin/kustomize | |
kustomize: ## Download kustomize locally if necessary. | ||
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected]) | ||
|
||
# Starting in 0.18, setup-envtest requires golang 1.22+. Pinning to `release-0.17`, which requires golang 1.20+. | ||
# TODO: Return to using `@latest` once we upgrade golang to 1.22. | ||
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) | ||
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.17) | ||
|
||
|
||
OPERATOR_SDK = $(shell pwd)/bin/operator-sdk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters