hypershift: auto-detect CLI flag support via --help - #81331
Conversation
WalkthroughSix ci-operator release config YAML files for hypershift (4.19/4.20/4.21, openshift and openshift-priv) update the e2e-aws-upgrade-hypershift-operator job's env, removing ENABLE_SCALE_FROM_ZERO and adding HYPERSHIFT_RELEASE_LATEST and CI_TESTS_RUN. The hypershift-install script and ref replace the ENABLE_SCALE_FROM_ZERO dependency with help-output-based CLI flag detection. ChangesUpgrade Test Configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: hypershift-release-config-owners, hypershift-step-registry-owners 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Replace ENABLE_SCALE_FROM_ZERO toggle with --help grep to auto-detect whether the CLI supports a flag. Also gates --additional-operator-env-vars which is only available in 4.21+ and was breaking upgrade tests on 4.19/4.20. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
a4e28d1 to
7ca1af7
Compare
|
[REHEARSALNOTIFIER]
A total of 600 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 600 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 pull-ci-openshift-hypershift-release-4.19-e2e-aws-upgrade-hypershift-operator pull-ci-openshift-hypershift-release-4.20-e2e-aws-upgrade-hypershift-operator |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-hypershift-release-4.19-e2e-aws-upgrade-hypershift-operator pull-ci-openshift-hypershift-release-4.21-e2e-aws-upgrade-hypershift-operator pull-ci-openshift-hypershift-release-4.22-e2e-aws-upgrade-hypershift-operator pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator pull-ci-openshift-hypershift-main-e2e-aws pull-ci-openshift-hypershift-main-e2e-aks pull-ci-openshift-hypershift-main-e2e-azure-v2-self-managed looks like pull-ci-openshift-hypershift-release-4.19-e2e-aws-upgrade-hypershift-operator failure is an infra issue |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/approve |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: devguyio, enxebre, muraee 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 |
|
the e2e-aws-upgrade-hypershift-operator-jobs 4.20 and 4.19 failures should be fixed by openshift/hypershift#8891 |
|
/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aws the e2e-aws-main failure is due to a timeout in ignition for one of the 3 nodes. full report here https://gist.github.com/devguyio/901fd19c3919eb250b14357dead454a0 |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aks |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@devguyio: 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. |
|
/pj-rehearse pull-ci-openshift-hypershift-main-e2e-aws |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse ack all failures are expected and we have the important success we were looking for |
|
@devguyio: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/retest-required |
4bfb5fe
into
openshift:main
Replace ENABLE_SCALE_FROM_ZERO toggle with --help grep to auto-detect whether the CLI supports a flag. Also gates --additional-operator-env-vars which is only available in 4.21+ and was breaking upgrade tests on 4.19/4.20. Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace ENABLE_SCALE_FROM_ZERO toggle with --help grep to auto-detect whether the CLI supports a flag. Also gates --additional-operator-env-vars which is only available in 4.21+ and was breaking upgrade tests on 4.19/4.20. Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace ENABLE_SCALE_FROM_ZERO toggle with --help grep to auto-detect whether the CLI supports a flag. Also gates --additional-operator-env-vars which is only available in 4.21+ and was breaking upgrade tests on 4.19/4.20. Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
ENABLE_SCALE_FROM_ZEROtoggle with--helpgrep to auto-detect CLI flag support--additional-operator-env-vars(4.21+) which was breaking upgrade tests on 4.19/4.20 with "unknown flag"ENABLE_SCALE_FROM_ZEROenv var from ref YAML and config overrides from 4.19–4.21 configsFollows up on #81259 which fixed scale-from-zero but missed
--additional-operator-env-vars.How it works
After CLI resolution, caches
hypershift install --helpoutput once. Before adding a flag that isn't universally available, greps the cache. No new env vars or config overrides needed for future flags.Flag compatibility (audited from
cmd/install/install.goper branch)--additional-operator-env-vars--scale-from-zero-*What's next
This is a tactical fix. A follow-up PR will restructure the install script into clear stages:
The current script will be preserved as a legacy path behind a mode switch, with the new path rolled out incrementally on individual jobs.
Test plan
e2e-aws-upgrade-hypershift-operatoron 4.19–4.22 — unsupported flags auto-skippede2e-aws,e2e-aks,e2e-azure-v2-self-managed,e2e-v2-gkeon main — all flags pass through🤖 Generated with Claude Code