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

OCPCLOUD-2563: Add Machine/MachineSet API for MAPI to CAPI migration #1818

Merged

Conversation

JoelSpeed
Copy link
Contributor

This implements the first part of the API from openshift/enhancements#1465.

This adds a new authoritativeAPI field to the Machine and MachineSet spec and status, which will allow our new project to determine which of the two backends should be implementing the functionality of the machines.

The feature will be behing the MachineAPIMigration feature gate. Not adding this to TechPreview until we have got something to show for the project, likely in 4.17.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 19, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 19, 2024

@JoelSpeed: This pull request references OCPCLOUD-2563 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to this:

This implements the first part of the API from openshift/enhancements#1465.

This adds a new authoritativeAPI field to the Machine and MachineSet spec and status, which will allow our new project to determine which of the two backends should be implementing the functionality of the machines.

The feature will be behing the MachineAPIMigration feature gate. Not adding this to TechPreview until we have got something to show for the project, likely in 4.17.

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.

Copy link
Contributor

openshift-ci bot commented Mar 19, 2024

Hello @JoelSpeed! 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 19, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were in the base set of test files, but other platforms have their own test file, so, pulled these out

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2024
@JoelSpeed
Copy link
Contributor Author

/hold until @deads2k can review

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 19, 2024
@theobarberbany
Copy link
Contributor

/retest

@theobarberbany
Copy link
Contributor

LGTM at first pass.

The Machine API Test files changes are unrelated to this change, right? Just a result of the new way that featuregates are being done?

@JoelSpeed
Copy link
Contributor Author

The Machine API Test files changes are unrelated to this change, right? Just a result of the new way that featuregates are being done?

When adding feature gated fields, the generators now generate various feature gate versions of each CRD. Each CRD is required to have a test suite file, so I had to add them as I'm the first one putting a feature gated field on some of these resources

@nrb
Copy link

nrb commented Mar 20, 2024

I take it you're omitting MachineHealthCheck and ControlPlaneMachineSet here on purpose?

@JoelSpeed
Copy link
Contributor Author

I take it you're omitting MachineHealthCheck and ControlPlaneMachineSet here on purpose?

Yes, my intention is that we build out the Machine and MachineSet core functionality for this feature first, and then once we have made progress on those, start looking more at the extensions like MHC and CPMS

@JoelSpeed JoelSpeed force-pushed the mapi-authoritative-api branch 2 times, most recently from 91c98da to 8a8ed13 Compare March 21, 2024 17:29
@JoelSpeed
Copy link
Contributor Author

/test integration

Change was a global timeout hit, not related to this PR

@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
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 27, 2024
@theobarberbany
Copy link
Contributor

theobarberbany commented Apr 2, 2024

I attempted to rebase this, then got confused as we are part way through changing how tests work (feature gates, files moving around).

I don't think this is a blocker yet on our work so I have reverted to how Joel left it.

New docs in https://github.com/openshift/api/pull/1834/files

@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 10, 2024
@theobarberbany
Copy link
Contributor

🤞 for getting this rebase right, this time

@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 10, 2024
@theobarberbany
Copy link
Contributor

theobarberbany commented Apr 10, 2024

That's a fun bug in the bot 😂

All CI failing : Terminal error: nonretryable error: no build client found for cluster "build03".

CI Bot: all tests passed!

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 22, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 22, 2024
@soltysh
Copy link
Member

soltysh commented May 22, 2024

/test verify-client-go

1 similar comment
@JoelSpeed
Copy link
Contributor Author

/test verify-client-go

@JoelSpeed
Copy link
Contributor Author

/retest

@JoelSpeed
Copy link
Contributor Author

/override ci/prow/verify-crd-schema

Copy link
Contributor

openshift-ci bot commented May 23, 2024

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/verify-crd-schema

In response to this:

/override ci/prow/verify-crd-schema

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.

@racheljpg
Copy link

/lgtm

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

/lgtm

Copy link
Contributor

openshift-ci bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 4bdfeed and 2 for PR HEAD ce87825 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 3bdec88 and 1 for PR HEAD ce87825 in total

@JoelSpeed
Copy link
Contributor Author

/override ci/prow/verify-crd-schema
/test e2e-aws-ovn

Copy link
Contributor

openshift-ci bot commented May 24, 2024

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/verify-crd-schema

In response to this:

/override ci/prow/verify-crd-schema
/test e2e-aws-ovn

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.

Copy link
Contributor

openshift-ci bot commented May 24, 2024

@JoelSpeed: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit e0056f2 into openshift:master May 24, 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.17.0-202405241743.p0.ge0056f2.assembly.stream.el9 for distgit ose-cluster-config-api.
All builds following this will include this PR.

@@ -224,6 +227,3 @@ type Condition struct {
// +optional
Message string `json:"message,omitempty"`
}

// Conditions provide observations of the operational state of a Machine API resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably on me, but did we intend to remove the Conditions type??

When im bringing this change into the MAO we're failing to build because this is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we did, please substitute Conditions for []Condition as you bring this into MAO

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.

None yet

9 participants