Unify version checks in pre-config and install steps for 4.N to 5.N compatibility#77356
Unify version checks in pre-config and install steps for 4.N to 5.N compatibility#77356jianlinliu wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jianlinliu 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 |
|
/pj-rehearse periodic-ci-openshift-verification-tests-main-installation-nightly-4.16-azure-ipi-vmgenv2-f28 periodic-ci-openshift-verification-tests-main-installation-nightly-4.16-gcp-upi-xpn-f28 periodic-ci-openshift-openshift-tests-private-release-4.23-multi-nightly-aws-upi-basecap-none-arm-f7 periodic-ci-openshift-openshift-tests-private-release-4.19-amd64-stable-aws-ipi-disc-priv-localzone-fips-f28 periodic-ci-openshift-openshift-tests-private-release-4.17-amd64-stable-aws-c2s-ipi-disc-priv-fips-f28 periodic-ci-openshift-openshift-tests-private-release-4.20-multi-stable-aws-ipi-proxy-sts-arm-f28 periodic-ci-openshift-openshift-tests-private-release-5.0-multi-nightly-azure-ipi-sharednetwork-public-to-private-arm-f28 |
|
@jianlinliu: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
1a96102 to
582f5db
Compare
…ompatibility Replace arithmetic version comparisons with sort -V based functions in configuration steps that run before ipi-install-install. Changes: - Add inline version comparison functions (version_ge, version_gt, version_le, version_lt) to 25 pre-configuration command scripts - Replace arithmetic comparisons like (( major == 4 && minor >= 12 )) with semantic version comparisons using sort -V - Remove major/minor version extraction where no longer needed - Replace custom version check functions in GCP files with standardized version_ge function - Update inactive/commented code to follow the same pattern This ensures version comparisons work correctly across major version boundaries (e.g., comparing 5.0 with 4.20). Files updated: - AWS: 9 files (c2s, cluster, provision, ipi/conf, upi) - Azure: 6 files (cluster, provision, ipi/conf) - GCP: 4 files (provision, upi, ipi/conf) - IPI: 3 files (capability, manual-creds, network) - Other: 3 files (edge-nodes, enable-qe-catalogsource) Related: openshift#73626
582f5db to
c42cf76
Compare
|
[REHEARSALNOTIFIER]
A total of 28442 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
[REHEARSALNOTIFIER]
A total of 28442 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@jianlinliu: The following tests failed, say
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. |
|
[REHEARSALNOTIFIER]
A total of 28442 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs. A full list of affected jobs can be found here Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse periodic-ci-openshift-verification-tests-main-installation-nightly-4.16-azure-ipi-vmgenv2-f28 periodic-ci-openshift-verification-tests-main-installation-nightly-4.16-gcp-upi-xpn-f28 periodic-ci-openshift-openshift-tests-private-release-4.23-multi-nightly-aws-upi-basecap-none-arm-f7 periodic-ci-openshift-openshift-tests-private-release-4.19-amd64-stable-aws-ipi-disc-priv-localzone-fips-f28 periodic-ci-openshift-openshift-tests-private-release-4.17-amd64-stable-aws-c2s-ipi-disc-priv-fips-f28 periodic-ci-openshift-openshift-tests-private-release-4.20-multi-stable-aws-ipi-proxy-sts-arm-f28 periodic-ci-openshift-openshift-tests-private-release-5.0-multi-nightly-azure-ipi-sharednetwork-public-to-private-arm-f28 |
|
@jianlinliu: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
It seems olmv1-disable-default-clustercatalogs also need this fix? |
lvms-catalogsource seems to need it as well? cc @Xia-Zhao-rh |
Easy fix, I will fix it after the 1st round of rehearse completed.
It is a easy fix, is there anyone help approve the change ? |
after it is fixed, I can add lgtm. |
Do you have approval permission on |
|
/pj-rehearse periodic-ci-openshift-verification-tests-main-installation-nightly-4.16-gcp-upi-xpn-f28 |
|
@jianlinliu: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
No. I can only add lgtm. |
How about I only update |
ok for me. |
Summary
This PR unifies version comparison logic in pre-configuration and install steps to ensure compatibility with OpenShift major version transitions (4.N to 5.N).
Changes
sort -Vbased version comparison functions to 25 command scripts(( major == 4 && minor >= 12 ))with semantic version comparisons (e.g.,version_ge "${ocp_version}" "4.12")ocp_major_versionandocp_minor_versionvariable extractions where no longer neededversion_gefunctionFiles Updated (25 total)
AWS (9 files)
Azure (6 files)
GCP (4 files)
IPI Configuration (3 files)
Other (3 files)
Why This Matters
Arithmetic comparisons fail across major version boundaries:
(( 5 == 4 && 0 >= 12 ))evaluates to false (incorrect)version_ge "5.0" "4.12"usingsort -Vevaluates to true (correct)Testing
sort -Vfor proper semantic version comparisonRelated