fix(ci): use dynamic API version in upgrade test - #2998
Conversation
The upgrade test hardcoded `rhdh.redhat.com/v1alpha3` when creating the Backstage CR against the "from" operator. Since release-1.10 no longer serves v1alpha3, the 1.10=>main upgrade path fails. Query the installed CRD for its storage version instead, which is always served regardless of the branch. Assisted-by: Claude
Code Review by Qodo
1. Unvalidated CRD version string
|
|
/cherry-pick release-1.10 |
|
|
@rm3l: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
PR Summary by QodoFix upgrade e2e test by deriving Backstage CRD storage API version WalkthroughsDescription• Fix 1.10→main upgrade e2e failures caused by hardcoded Backstage API version. • Derive the Backstage CR apiVersion from the installed CRD storage version. • Add helper to query CRD storage version via platform CLI jsonpath. Diagramgraph TD
A["Upgrade e2e test"] --> B["Read CRD storage ver"] --> C{{"oc/kubectl"}} --> D[("Backstage CRD")]
A --> E["Apply Backstage CR"] --> C --> F["Backstage CR"]
subgraph Legend
direction LR
_t["Test code"] ~~~ _cli{{"CLI"}} ~~~ _crd[("CRD")]
end
High-Level AssessmentThe following are alternative approaches to this PR: 1. Use API discovery (RESTMapper) instead of CLI jsonpath
2. Try multiple known apiVersions (fallback list)
Recommendation: Current approach (query CRD storage version and use it as the CR apiVersion) is the most robust and lowest-maintenance option for cross-branch upgrade testing, with minimal additional complexity. The main caveat is continued reliance on the platform CLI, but that is already a core part of the existing e2e harness. File ChangesBug fix (1)
Other (1)
|
|
Preparing PR labels... |
|
Merging so we can manually trigger the upgrade nightly checks.. |
|
@rm3l: new pull request created: #2999 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 kubernetes-sigs/prow repository. |



Description
The upgrade test hardcoded
rhdh.redhat.com/v1alpha3when creating the Backstage CR against the "from" operator. Since 1.10+ no longer servesv1alpha3(#2727), the1.10 => mainupgrade path fails: https://github.com/redhat-developer/rhdh-operator/actions/runs/27315253434/job/80694281540This PR queries the installed CRD for its storage version instead, which is always served regardless of the branch.
Will need to be cherry-picked to
release-1.10as well.Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer