Skip to content
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

NO-JIRA: Add DevPreviewNoUpgrade as a featureset #1825

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Mar 22, 2024

Some features were getting delivered as devpreview and created their own custom gating mechanism which is not automatically tracked by our tooling. This makes it easy to add featuregates as dev preview without causing rippling impacts for all API authors.

Once we merge this, we must create a test job to show it working.

@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 Mar 22, 2024
Copy link
Contributor

openshift-ci bot commented Mar 22, 2024

Hello @deads2k! 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 22, 2024
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 22, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 23, 2024
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from 7f2ce3c to 6bfc356 Compare March 29, 2024 14:26
@deads2k deads2k changed the title [wip] starting devpreview discussions Add DevPreviewNoUpgrade as a featureset Mar 29, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 29, 2024
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from 6bfc356 to 3ede02b Compare March 29, 2024 14:29
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 29, 2024
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from 3ede02b to 28f074c Compare March 29, 2024 15:17
@deads2k
Copy link
Contributor Author

deads2k commented Mar 29, 2024

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 30, 2024
@deads2k deads2k changed the title Add DevPreviewNoUpgrade as a featureset NO-JIRA: Add DevPreviewNoUpgrade as a featureset Apr 15, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 15, 2024
@openshift-ci-robot
Copy link

@deads2k: This pull request explicitly references no jira issue.

In response to this:

Some features were getting delivered as devpreview and created their own custom gating mechanism which is not automatically tracked by our tooling. This makes it easy to add featuregates as dev preview without causing rippling impacts for all API authors.

Once we merge this, we must create a test job to show it working.

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 openshift-eng/jira-lifecycle-plugin repository.

@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from 28f074c to 54c24d1 Compare April 15, 2024 15:35
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2024
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch 2 times, most recently from b18f8d8 to 27c4944 Compare April 15, 2024 22:07
Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

Do we have some criteria by which a developer would decide if their feature is Dev vs TechPreview? And do we have somewhere where we can document that?

@@ -67,6 +68,7 @@ type FeatureGateSelection struct {
// +optional
// +kubebuilder:validation:XValidation:rule="oldSelf == 'CustomNoUpgrade' ? self == 'CustomNoUpgrade' : true",message="CustomNoUpgrade may not be changed"
// +kubebuilder:validation:XValidation:rule="oldSelf == 'TechPreviewNoUpgrade' ? self == 'TechPreviewNoUpgrade' : true",message="TechPreviewNoUpgrade may not be changed"
// +kubebuilder:validation:XValidation:rule="oldSelf == 'DevPreviewNoUpgrade' ? self == 'DevPreviewNoUpgrade' : true",message="DevPreviewNoUpgrade may not be changed"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't remember there being CEL here, but, LGTM. Is it new?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't remember there being CEL here, but, LGTM. Is it new?

"while you were out" :)

@@ -157,6 +157,9 @@ func getOrderedFeatureGates(info map[string]map[string]*featureGateInfo) []strin
for _, featureGate := range byFeature.enabled.List() {
counts[featureGate] = counts[featureGate] + 1
}
for _, featureGate := range byFeature.disabled.List() {
counts[featureGate] = counts[featureGate] + 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Ineffective assignment? Did you mean add 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ineffective assignment? Did you mean add 0?

I think so. Just making it clear how to bump in the list and nice and parallel. Similar blocks exist in other repos that do shift priority.

crdFilename := strings.ReplaceAll(crdFilenamePattern, "MARKERS", fmt.Sprintf("-%s", utils.ClusterProfileToShortName(clusterProfile)))
clusterProfileShortName, err := utils.ClusterProfileToShortName(clusterProfile)
if err != nil {
panic(fmt.Sprintf("unrecognized clusterprofile name %q: %w", clusterProfile, err))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this a panic rather than failing gracefully? Is this user in put or a code problem?

crdFilename := strings.ReplaceAll(crdFilenamePattern, "MARKERS", fmt.Sprintf("-%s-%s", utils.ClusterProfileToShortName(curr.clusterProfile), curr.featureSet))
clusterProfileShortName, err := utils.ClusterProfileToShortName(curr.clusterProfile)
if err != nil {
panic(fmt.Sprintf("unrecognized clusterprofile name %q: %w", curr.clusterProfile, err))
Copy link
Contributor

Choose a reason for hiding this comment

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

As above, should this really be a panic?

@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from 27c4944 to cc7b693 Compare April 16, 2024 15:37
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from cc7b693 to 9ab6ed1 Compare April 16, 2024 17:57
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch 2 times, most recently from 774b4ca to de5d2ab Compare April 16, 2024 21:27
@deads2k deads2k force-pushed the by-gate-27-dev-preview branch from de5d2ab to 17878f0 Compare April 17, 2024 12:55
@deads2k
Copy link
Contributor Author

deads2k commented Apr 17, 2024

/retest-required

@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2024
Copy link
Contributor

openshift-ci bot commented Apr 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, JoelSpeed

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-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3efee42 and 2 for PR HEAD 17878f0 in total

@deads2k
Copy link
Contributor Author

deads2k commented Apr 17, 2024

/retest

2 similar comments
@deads2k
Copy link
Contributor Author

deads2k commented Apr 17, 2024

/retest

@deads2k
Copy link
Contributor Author

deads2k commented Apr 17, 2024

/retest

Copy link
Contributor

openshift-ci bot commented Apr 17, 2024

@deads2k: all tests passed!

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

@openshift-merge-bot openshift-merge-bot bot merged commit 21822c8 into openshift:master Apr 17, 2024
18 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-config-api-container-v4.16.0-202404181209.p0.g21822c8.assembly.stream.el9 for distgit ose-cluster-config-api.
All builds following this will include this PR.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants