Skip to content

Conversation

naseerahkani
Copy link
Contributor

@naseerahkani naseerahkani commented Jun 26, 2025

Updating the MachineConfigNode (MCN) object to support on cluster layering (OCL). Advice/suggestions for the comments for the updated code would be greatly appreciated.

Here are details on the enhancement.

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

openshift-ci-robot commented Jun 26, 2025

@naseerahkani: This pull request references MCO-1675 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.20.0" version, but no target version was set.

In response to this:

Updating the MachineConfigNode (MCN) object to support on cluster layering (OCL). Advice/suggestions for the comments for the updated code would be greatly appreciated.

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 Jun 26, 2025

Hello @naseerahkani! 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 26, 2025
@openshift-ci openshift-ci bot requested review from cheesesashimi and jkyros June 26, 2025 15:58
Comment on lines 25 to 26
// +kubebuilder:printcolumn:name="UpdatedOSImage",type="string",JSONPath=.status.conditions[?(@.type=="AppliedOSImage")].status,priority=1
// +kubebuilder:printcolumn:name="UpdatedFiles",type="string",JSONPath=.status.conditions[?(@.type=="AppliedFiles")].status,priority=1
Copy link
Member

Choose a reason for hiding this comment

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

I'd imagine these and the ImagePulledFromRegistry column would somehow need to be feature gated since they will not be conditions populated in a non-tech preview cluster.

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 believe there exists today a way for us to feature-gate print columns - although this is something we could add if we had enough of a use case for it.

What is the worst case here if the conditions don't exist here? Does it show up empty? Does it result in a failure to display the results from a command?

Copy link
Member

Choose a reason for hiding this comment

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

although this is something we could add if we had enough of a use case for it.

Maybe adding this as a low priority backlog item would be good, but I don't think the use case for it here is important enough.

What is the worst case here if the conditions don't exist here? Does it show up empty? Does it result in a failure to display the results from a command?

It shows up empty, which is not the end of the world. I just don't think it's ideal if there's another approach, but it seems that there is not really another option here.

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 columns will not be printed for the time being to make sure users are not confused. They will be added back when the image mode status reporting is ready to be GAed. The status of this will be tracked in this ticket.

Comment on lines 288 to 290
// Deprecated: AppliedFilesAndOS is being replaced by AppliedFiles and AppliedOSImage.
// This constant is maintained for backward compatibility.
MachineConfigNodeAppliedFilesAndOS StateProgress = "AppliedFilesAndOS"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not quite sure how we want to handle this, but I'm curious if this approach is valid. This is how I'm interpreting this, but I could be incorrect:

  • This merging would state that in 4.20 the MachineConfigNodeAppliedFilesAndOS status is depreciated in general (so in both tech preview and non-tech preview clusters).
  • But, this isn't quite correct since a standard non-tech preview enabled cluster in 4.20 does have a supported MachineConfigNodeAppliedFilesAndOS condition.
  • Maybe a feature gate here can distinguish that the idea is to deprecate this starting with the implementation of ImageModeStatusReporting? Or maybe wait until the new statuses (MachineConfigNodeUpdateFiles & MachineConfigNodeUpdateOS) are implemented before it makes sense to start a deprecation of MachineConfigNodeAppliedFilesAndOS (maybe that's done in a subsequent release?)?

This is probably something that would need input from other MCO/API folks. I'm sure there's a set process for this, but I'm not aware of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Marking this type deprecated would only show up for those consuming this as a Go package as these comments won't show up in generated documentation that end-users of OpenShift would see.

That being said, I think it is generally a bit of an anti-pattern to deprecate something before there is a concrete replacement for it. In this case if it is only deprecated in TPNU clusters I would wait to mark this as deprecated until the feature that deprecates it goes GA.

Also note that deprecating something doesn't mean it stops functioning, just that users should be aware that this condition will be removed in a future release and should consider relying on other conditions instead. IIUC, this condition should continue to be populated the same as it always has.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This type still needs to be deprecated and will be taken care of at another time. For future reference, this ticket will be used to keep track of changes/updates.

@openshift-ci openshift-ci bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 27, 2025
@isabella-janssen
Copy link
Member

/retest-required

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.

Doing an initial pass on the API changes themselves. I've got a couple comments that may change the tests a bit so once those are ironed out I'll take another pass and look at the tests as well.

Comment on lines 25 to 26
// +kubebuilder:printcolumn:name="UpdatedOSImage",type="string",JSONPath=.status.conditions[?(@.type=="AppliedOSImage")].status,priority=1
// +kubebuilder:printcolumn:name="UpdatedFiles",type="string",JSONPath=.status.conditions[?(@.type=="AppliedFiles")].status,priority=1
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 believe there exists today a way for us to feature-gate print columns - although this is something we could add if we had enough of a use case for it.

What is the worst case here if the conditions don't exist here? Does it show up empty? Does it result in a failure to display the results from a command?

Comment on lines 288 to 290
// Deprecated: AppliedFilesAndOS is being replaced by AppliedFiles and AppliedOSImage.
// This constant is maintained for backward compatibility.
MachineConfigNodeAppliedFilesAndOS StateProgress = "AppliedFilesAndOS"
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking this type deprecated would only show up for those consuming this as a Go package as these comments won't show up in generated documentation that end-users of OpenShift would see.

That being said, I think it is generally a bit of an anti-pattern to deprecate something before there is a concrete replacement for it. In this case if it is only deprecated in TPNU clusters I would wait to mark this as deprecated until the feature that deprecates it goes GA.

Also note that deprecating something doesn't mean it stops functioning, just that users should be aware that this condition will be removed in a future release and should consider relying on other conditions instead. IIUC, this condition should continue to be populated the same as it always has.

@JoelSpeed
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 6, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 6a7223e and 2 for PR HEAD 9d44d1a in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 7605f9b and 1 for PR HEAD 9d44d1a in total

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2025
@JoelSpeed
Copy link
Contributor

/lgtm
/retest-required

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

openshift-ci bot commented Aug 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven, JoelSpeed, naseerahkani, yuqi-zhang

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 a42cd21 and 2 for PR HEAD 9439983 in total

@JoelSpeed
Copy link
Contributor

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 356d265 and 1 for PR HEAD 9439983 in total

@JoelSpeed
Copy link
Contributor

/override ci/prow/e2e-aws-ovn-hypershift-conformance

Test failure on a DNS test, don't believe this is related

Copy link
Contributor

openshift-ci bot commented Aug 8, 2025

@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/e2e-aws-ovn-hypershift-conformance

In response to this:

/override ci/prow/e2e-aws-ovn-hypershift-conformance

Test failure on a DNS test, don't believe this is related

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.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c974eea and 0 for PR HEAD 9439983 in total

@openshift-ci-robot
Copy link

/hold

Revision 9439983 was retested 3 times: holding

@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 Aug 8, 2025
@JoelSpeed
Copy link
Contributor

/hold cancel
/retest-required

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 11, 2025
Copy link
Contributor

openshift-ci bot commented Aug 11, 2025

@naseerahkani: 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/e2e-gcp 9439983 link false /test e2e-gcp
ci/prow/okd-scos-e2e-aws-ovn 9439983 link false /test okd-scos-e2e-aws-ovn

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

/retest-required

Remaining retests: 0 against base HEAD c974eea and 2 for PR HEAD 9439983 in total

@isabella-janssen
Copy link
Member

/close

Closing in favor of #2442, which contains all the commits from this PR, an additional commit to pull in the changes from https://github.com/openshift/api/tree/master, and a small tweak for new validation standards.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

@openshift-ci openshift-ci bot closed this Aug 12, 2025
Copy link
Contributor

openshift-ci bot commented Aug 12, 2025

@isabella-janssen: Closed this PR.

In response to this:

/close

Closing in favor of #2442, which contains all the commits from this PR, an additional commit to pull in the changes from https://github.com/openshift/api/tree/master, and a small tweak for new validation standards.

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.

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

10 participants