Skip to content

MCO-1518: Create V1 MCN API #2255

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

isabella-janssen
Copy link
Member

@isabella-janssen isabella-janssen commented Mar 31, 2025

Included work:

References:

@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 31, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 31, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

What I did:

  • Copies over the v1alpha1 MCN api into the v1 folder.
  • Removes the unused Spec.PinnedImageSets field.
  • Removes comments suggesting future changes and updates compatibility level.

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 31, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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 31, 2025
Copy link
Contributor

openshift-ci bot commented Mar 31, 2025

Hello @isabella-janssen! 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 31, 2025
@isabella-janssen
Copy link
Member Author

/test all

@isabella-janssen isabella-janssen changed the title (Work in Progress) MCO-1518: Promote MCN to GA (Work in Progress) MCO-1518: Create V1 MCN API Mar 31, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 1, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

Included work:

  • Copies over the v1alpha1 MCN api into the v1 folder.
  • Removes the unused Spec.PinnedImageSets field.
  • Removes comments suggesting future changes and updates compatibility level.

References:

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.

@isabella-janssen
Copy link
Member Author

/test all

@isabella-janssen isabella-janssen marked this pull request as ready for review April 1, 2025 14:15
@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 Apr 1, 2025
@openshift-ci openshift-ci bot requested review from cheesesashimi and jkyros April 1, 2025 14:16
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 1, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

Included work:

References:

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 1, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

Included work:

References:

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.

@isabella-janssen isabella-janssen changed the title (Work in Progress) MCO-1518: Create V1 MCN API MCO-1518: Create V1 MCN API Apr 1, 2025
@isabella-janssen isabella-janssen force-pushed the create-mcn-v1-api branch 2 times, most recently from 10f6549 to fa125b7 Compare April 9, 2025 15:25
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 9, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

Included work:

References:

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.

Comment on lines +5 to +7
#TODO(ijanssen): once MCO side is ready for MCN v1 API, update the v1 crds back to
# `machineconfiguration/v1/zz_generated.crd-manifests/*.crd.yaml` and remove MCN v1alpha1 crd ref
# `machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes*.crd.yaml`.
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we plan to co-ordinate this? Do we need to simul-merge a couple of PRs to make this actually work?

Copy link
Member Author

@isabella-janssen isabella-janssen Apr 10, 2025

Choose a reason for hiding this comment

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

My understanding is we will need to simul-merge PRs in the following repos for this:

Linking this Slack thread where this is also being discussed: https://redhat-internal.slack.com/archives/CE4L0F143/p1744292448679729?thread_ts=1744228390.483339&cid=CE4L0F143

Copy link
Contributor

Choose a reason for hiding this comment

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

This has been the steps we've done for other v1 APIs, curious if there's a better way to do this, since there's a disconnect between the deployment of the CRD (happens here) vs consuming the API (in the MCO) without having to write a conversion webhook.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not personally aware of any better ways to do this. When I was on the OLM team, our approach for "breaking" changes like this was to temporarily disable the tests that would fail (and maybe remove ourselves from the payload), force merge the updates simultaneously, and finally re-enable the tests.

I would be curious to explore if there is a better way to do this now using a combination of API discovery and Go generics, but that is likely a heavy handed change.

Copy link
Member

Choose a reason for hiding this comment

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

My understanding is that we'd have to serve both apis with a v1alpha1 to v1 mutating webhook. Update all clients to v1, we should check for v1alpha1 usage and when there is none remove it.

Given this is all behind TPNU right now and our intention is to transition to v1 before lifting that gate I think we can cut some corners. docs.ci.openshift.org is down right now but I believe there's docs there on how to run payload tests with multiple PRs merged. So we should stage all of the PRs, test it that way, and I can help coordinate making sure they merge at approximately the same time. Of course all contingent on the v1 API review and tests passing.


// StateProgress is each possible state for each possible MachineConfigNodeType
// +enum
type StateProgress string
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't used in the API?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's used as the type definition for the conditions below and in the MCO-side code to define the type of a condition state.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 11, 2025

@isabella-janssen: This pull request references MCO-1518 which is a valid jira issue.

In response to this:

Included work:

References:

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 Apr 11, 2025

@isabella-janssen: 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-client-go 5fafc7d link true /test verify-client-go

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.

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

Seems safe as a direct lift of the v1alpha API, and we won't be using it until we can switch the MCO code and use both, so it should be considered tested since v1alpha1 is.

I can't speak to whether the tombstoned fields being removed affects anything, but otherwise LGTM!

Comment on lines +5 to +7
#TODO(ijanssen): once MCO side is ready for MCN v1 API, update the v1 crds back to
# `machineconfiguration/v1/zz_generated.crd-manifests/*.crd.yaml` and remove MCN v1alpha1 crd ref
# `machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes*.crd.yaml`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This has been the steps we've done for other v1 APIs, curious if there's a better way to do this, since there's a disconnect between the deployment of the CRD (happens here) vs consuming the API (in the MCO) without having to write a conversion webhook.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

/lgtm

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

openshift-ci bot commented Apr 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: everettraven, isabella-janssen, yuqi-zhang
Once this PR has been reviewed and has the lgtm label, please assign joelspeed 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

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

6 participants