Skip to content

WIP: features: Add a TestOCAdminUpgradeTechPreview feature gate #2337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wking
Copy link
Member

@wking wking commented May 21, 2025

This feature gate is only tied to the CI suite (hence the Test... prefix), and enables the tests image to exercise tech-preview 'oc adm upgrade ...' command-line functionality when run against this cluster. This is different from many feature gates, where the feature gate covers both "implement the functionality" (e.g. API properties in CustomResourceDefinitions or in-cluster controller behavior" and "run the tests that exercise that functionality". Because the functionality is in the command line, we can exercise tech-preview command-line behavior even against default feature set clusters, as we point out in docs:

The oc adm upgrade recommend command is a Technology Preview feature only...

Your cluster does not need to be a Technology Preview-enabled cluster in order for you to use the oc adm upgrade recommend command.

By including the new feature gate in the default feature set, default-feature-set CI runs will exercise the tech-preview functionality, and confirm that the documented "works vs. default clusters" claim remains accurate.

There's a chance that instability in the tech-preview oc functionality destabilizes CI results for those default feature-set clusters, but we can mitigate that risk by running more tests before merging changes, and backstop with very-easy-to-approve reverts and removals of any unstable tests if necessary to recover the default-CI job signal.

An alternative approach would be to define a new CI-job flavor between the current "tech-preview features against tech-preview clusters" and "GA features against GA clusters" to run "tech-preview features against GA clusters". But I currently expect these tech-preview command-line features to be rare and stable enough for it to not be worth the investment of building out a new job flavor. We can revisit that approach if it does turn out to cause problems for default-CI job signal.

I've gone with the generic TestOCAdminUpgradeTechPreview name because there are currently several tech-preview subcommands under oc adm upgrade ..., including OC_ENABLE_CMD_UPGRADE_STATUS, OC_ENABLE_CMD_UPGRADE_ROLLBACK, and OC_ENABLE_CMD_UPGRADE_RECOMMEND. If API approvers accept the idea that tech-preview 'oc adm upgrade ...' functionality should be tested against default-feature-set clusters, then it seems like they'd rather not bother reviewing each tech-preview idea and agreeing that it to should be tested against default-feature-set clusters. But if the API approvers do want to review this decision on a feature-by-feature basis, I could pivot to a more specific name.

This feature gate is only tied to the CI suite (hence the "Test..."
prefix), and enables the 'tests' image to exercise tech-preview 'oc
adm upgrade ...'  command-line functionality when run against this
cluster.  This is different from many feature gates, where the feature
gate covers both "implement the functionality" (e.g. API properties in
CustomResourceDefinitions or in-cluster controller behavior" and "run
the tests that exercise that functionality".  Because the
functionality is in the command line, we can exercise tech-preview
command-line behavior even against default feature set clusters, as we
point out in docs [1]:

  The oc adm upgrade recommend command is a Technology Preview feature
  only...

  Your cluster does not need to be a Technology Preview-enabled
  cluster in order for you to use the oc adm upgrade recommend
  command.

By including the new feature gate in the default feature set,
default-feature-set CI runs will exercise the tech-preview
functionality, and confirm that the documented "works vs. default
clusters" claim remains accurate.

There's a chance that instability in the tech-preview 'oc'
functionality destabilizes CI results for those default feature-set
clusters, but we can mitigate that risk by running more tests before
merging changes, and backstop with very-easy-to-approve reverts and
removals of any unstable tests if necessary to recover the default-CI
job signal.

An alternative approach would be to define a new CI-job flavor between
the current "tech-preview features against tech-preview clusters" and
"GA features against GA clusters" to run "tech-preview features
against GA clusters".  But I currently expect these tech-preview
command-line features to be rare and stable enough for it to not be
worth the investment of building out a new job flavor.  We can revisit
that approach if it does turn out to cause problems for default-CI job
signal.

I've gone with the generic TestOCAdminUpgradeTechPreview name because
there are currently several tech-preview subcommands under 'oc adm
upgrade ...', including OC_ENABLE_CMD_UPGRADE_STATUS,
OC_ENABLE_CMD_UPGRADE_ROLLBACK, and OC_ENABLE_CMD_UPGRADE_RECOMMEND.
If API approvers accept the idea that tech-preview 'oc adm upgrade
...'  functionality should be tested against default-feature-set
clusters, then it seems like they'd rather not bother reviewing each
tech-preview idea and agreeing that it to should be tested against
default-feature-set clusters.  But if the API approvers do want to
review this decision on a feature-by-feature basis, I could pivot to a
more specific name.

[1]: https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/updating_clusters/performing-a-cluster-update#update-upgrading-oc-adm-upgrade-recommend_updating-cluster-cli
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2025
Copy link
Contributor

openshift-ci bot commented May 21, 2025

Hello @wking! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 21, 2025
@openshift-ci openshift-ci bot requested review from deads2k and JoelSpeed May 21, 2025 18:47
Copy link
Contributor

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wking
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

openshift-ci bot commented May 21, 2025

@wking: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 7aa9e78 link true /test verify

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

reportProblemsToJiraComponent("oc / update").
contactPerson("wking").
productScope(ocpSpecific).
enhancementPR(legacyFeatureGateWithoutEnhancement).
Copy link
Member Author

Choose a reason for hiding this comment

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

verify is mad about the lack of enhancement, but I'm going to leave it alone for now, while I wait for API reviewers to decide how they feel about the general idea of a feature-gate to cover origin test-case enablement.

@JoelSpeed
Copy link
Contributor

This feature gate is only tied to the CI suite

The CI suite should be able to run tests without a gate existing in o/api, did you try this?

At the moment, the code doesn't behave as David expected, but I'm discussing this with the TRT folks this afternoon and this PR should resolve the issue of "unknown gates tests should be running". Which I think should mean that you don't need a gate.

Also, last I checked Sippy was just looking at the test output and isn't importing o/api to determine which gates do/do not exist, so as long as your JUnit is configured correctly, sippy should filter on the gate name as expected

will exercise the tech-preview functionality, and confirm that the documented "works vs. default clusters" claim remains accurate

Why is testing against tech preview clusters insufficient? Our requirement generally for promoting features to the default set is based on their ability to perform against tech preview clusters. If they work there, we assume that they also work on default. So this argument isn't congruent with our normal flow 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants