SRVKP-11558: remove deprecated k8s.io/api packages removed in v0.36.0#2834
Conversation
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
📝 WalkthroughWalkthroughThe change removes three Kubernetes API type packages from the scheme registration in 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello @anithapriyanatarajan! Some important instructions when contributing to openshift/api: |
|
Hi @anithapriyanatarajan. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
cc: @jkhelil This PR relates to case SRVKP-11558 |
|
/ok-to-test |
|
@anithapriyanatarajan: This pull request references SRVKP-11558 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
@anithapriyanatarajan: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/lgtm |
|
@JoelSpeed: This PR has been marked as verified by DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Pipeline controller notification No second-stage tests were triggered for this PR. This can happen when:
Use |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
k8s.io/api v0.36.0 (Kubernetes 1.36, released Dec 2025) deleted three Go packages that had been deprecated at the server level for years:
k8s.io/api/autoscaling/v2beta1 (deprecated k8s 1.12, server-removed k8s 1.26)
k8s.io/api/autoscaling/v2beta2 (deprecated k8s 1.23, server-removed k8s 1.26)
The upstream removal commit is kubernetes/api@d8ea27e.
k8s.io/api/scheduling/v1alpha1 (deprecated k8s 1.10, server-removed k8s 1.17)
Because Go resolves a single version of k8s.io/api across the entire module graph, any project that depends on both openshift/api and k8s.io/api >= v0.36.0 hits a hard build failure as below
k8s.io/api/autoscaling/v2beta2: module k8s.io/api@v0.36.0 found, but does not contain package k8s.io/api/autoscaling/v2beta2Example case : Experienced this issue while upgrading k8s.io/client-go to 0.36.0(https://github.com/tektoncd/operator/blob/main/go.mod#L45) to address kubernetes/client-go@ea7a7e7 . We are blocked because of this.
Fixed this by removing the three imports and their AddToScheme registrations from install.go. The stable replacements (autoscaling/v2 and scheduling/v1) were already registered and are unchanged.
Also removes the corresponding vendor directories and modules.txt
Assisted-by: Copilot Agent using Claude-Sonnet 4.6 model