deps: upgrade k8s.io/client-go from v0.35.2 to v0.36.0#3408
Open
anithapriyanatarajan wants to merge 1 commit intotektoncd:mainfrom
Open
deps: upgrade k8s.io/client-go from v0.35.2 to v0.36.0#3408anithapriyanatarajan wants to merge 1 commit intotektoncd:mainfrom
anithapriyanatarajan wants to merge 1 commit intotektoncd:mainfrom
Conversation
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
deps: upgrade k8s.io/client-go from v0.35.2 to v0.36.0
Summary
Upgrades
k8s.io/client-gofromv0.35.2tov0.36.0and aligns allk8s.io/*packages to the samev0.36.0release. This keeps the operator dependency stack current with the Kubernetes 1.36 release cycle.Fixes: SRVKP-11558 by consuming the commit
Background:
why the
replacedirective existsgo.moduses areplacedirective to overridek8s.io/client-goto thev0.36.0:This is intentional. Several of our transitive dependencies (openshift/client-go, openshift/library-go, openshift/apiserver-library-go) still declare k8s.io/client-go v0.35.x in their own go.mod. Go's Minimum Version Selection (MVS) would otherwise select the highest version requested across the whole module graph — but without this override, the ancient placeholder version v1.5.2 (from the 2016-era pre-semver release of client-go) would win, since v1.5.2 > v0.36.0 in semver. The replace directive (with no left-side version, meaning it overrides all versions) ensures the build always uses the modern v0.36.0. It can be removed once the OpenShift packages ship new pseudo-versions that themselves declare >= v0.36.0.
What was blocking this upgrade
k8s.io/api v0.36.0 deleted three Go packages that had been long deprecated at the server level:
Deprecated Kubernetes Packages
k8s.io/api/autoscaling/v2beta1k8s.io/api/autoscaling/v2beta2k8s.io/api/scheduling/v1alpha1Because Go resolves a single version of k8s.io/api across the entire module graph, any project depending on a library that still imports these packages will hit a hard compile-time failure:
k8s.io/api/autoscaling/v2beta1: module k8s.io/api@v0.36.0 found, but does not contain package k8s.io/api/autoscaling/v2beta1Two upstream fixes were required before this upgrade could land:
Commit: df317a52d112 → published as pseudo-version v0.0.0-20260507212125-df317a52d112
knative/pkg's webhook/testing/listers.go imported k8s.io/api/autoscaling/v2beta1 and k8s.io/client-go/listers/autoscaling/v2beta1. This caused a build failure for any consumer (including this operator) that resolved k8s.io/api >= v0.36.0. The PR replaced both with their stable autoscaling/v2 equivalents.
This PR bumps knative.dev/pkg from v0.0.0-20260319144801-8c68e18a5cc7 → v0.0.0-20260507212125-df317a52d112 to pick up that fix.
Commit: 2955bfa26c43 → published as pseudo-version v0.0.0-20260507124924-2955bfa26c43
openshift/api's install.go imported and registered autoscaling/v2beta1, autoscaling/v2beta2, and scheduling/v1alpha1 via AddToScheme. Because openshift/api is a direct dependency of this operator, any upgrade to k8s.io/api >= v0.36.0 would fail to compile without this fix. The PR removed the three deleted imports and their AddToScheme registrations along with the corresponding vendored directories (the stable replacements autoscaling/v2 and scheduling/v1 were already registered and are unchanged).
This PR bumps github.com/openshift/api from v0.0.0-20260429122012-1180c0f5c3e9 → v0.0.0-20260507124924-2955bfa26c43 to pick up that fix.
Version Change Summary
Follow-up
The replace k8s.io/client-go directive can be removed once openshift/client-go, openshift/library-go, and openshift/apiserver-library-go publish new pseudo-versions that declare k8s.io/client-go >= v0.36.0 natively, at which point MVS will select v0.36.0 without an override.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes
Assisted-by: Copilot Agent using Claude-Sonnet 4.6 model
/kind misc