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

machine-api: disallow unsetting authoritativeAPI #2091

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

Conversation

damdo
Copy link
Member

@damdo damdo commented Nov 8, 2024

We should disallow unsetting authoritativeAPI once it has been set.

Copy link
Contributor

openshift-ci bot commented Nov 8, 2024

Hello @damdo! 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 Nov 8, 2024
@openshift-ci openshift-ci bot requested review from JoelSpeed and mandre November 8, 2024 18:18
Copy link
Contributor

openshift-ci bot commented Nov 8, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: damdo
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Kubernetes 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

@@ -112,6 +112,7 @@ type MachineTemplateSpec struct {

// MachineSetStatus defines the observed state of MachineSet
// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == 'Migrating' && self.authoritativeAPI != 'Migrating')",message="synchronizedGeneration must not decrease unless authoritativeAPI is transitioning from Migrating to another value"
// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="self.authoritativeAPI != ” || oldSelf.authoritativeAPI == ”",message="authoritativeAPI cannot be unset once it has been set"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also want something similar on the spec? What about for Machines?

I would like to see some testing with the integration test suite that tests this validation transition

Copy link
Contributor

openshift-ci bot commented Nov 8, 2024

@damdo: The following tests 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/integration b824ff7 link true /test integration
ci/prow/verify-crd-schema b824ff7 link true /test verify-crd-schema

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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