Skip to content

Conversation

@camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Nov 11, 2025

Dependency Updates

Package From To
github.com/openshift/api v0.0.0-20221021112143 v0.0.0-20251111193948
github.com/openshift/client-go v0.0.0-20220525160904 v0.0.0-20251015124057
k8s.io/kube-openapi (various) (updated)
golang.org/x/net (indirect) (updated)
golang.org/x/term (indirect) (updated)
github.com/google/pprof (indirect) (updated)

Breaking Change

The upgraded github.com/openshift/api removed individual CRD YAML files from vendor. Tests were loading ClusterOperator and ClusterVersion CRDs from these files.

Fix: Generate CRDs programmatically in tests instead of loading from files.

  • Added newClusterOperatorCRD() and newClusterVersionCRD() helper functions
  • Removed file path dependencies
  • Tests now work in envtest/kind environments

@openshift-ci openshift-ci bot requested review from anik120 and kevinrizza November 11, 2025 20:09
@camilamacedo86 camilamacedo86 changed the title Upgrade dependencies; ocp/api* and indirects Upgrade dependencies; ocp/api*, kube-openapi and indirects Nov 11, 2025
@tmshort
Copy link
Contributor

tmshort commented Nov 11, 2025

/approve

@openshift-ci
Copy link

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2025
},
},
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmshort I need to address a breaking change in the recent ocp/api dependency upgrade.

Previous Behavior:
Our tests were loading ClusterOperator and ClusterVersion CRDs from YAML files in the vendor directory (github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_*.crd.yaml) and applying them directly to the envtest environment.

Breaking Change:
The upgraded github.com/openshift/api package (v0.0.0-20251111193948+) no longer provides individual CRD YAML files - they were removed in favor of a consolidated manifest.

Solution:
We're now generating the ClusterOperator and ClusterVersion CRDs programmatically in the test suite. This approach allows us still doing the test for OCP but still running it with kind/envtest.

Note: The CRD strict schema code in newClusterOperatorCRD() and newClusterVersionCRD() was generated by AI to match the required OpenShift API structure.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants