MCO-2151: Add stream detection to the boot image controller#5752
MCO-2151: Add stream detection to the boot image controller#5752djoshy wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
WalkthroughAdds two public constants for OS stream labeling and inserts pre-checks in boot image controller helpers to short-circuit reconciliation for machinesets/control-plane machinesets that specify a non-supported OS stream or are Windows-labelled, before fetching cluster/infra/bootimage config. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
14a163a to
6409e62
Compare
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/controller/bootimage/cpms_helpers.go`:
- Around line 116-118: The log message prints arguments in the wrong slots; in
the klog.Infof call that checks controlPlaneMachineSet.GetOwnerReferences(),
swap the two arguments so the first %s receives controlPlaneMachineSet.Name and
the second %v receives the owner reference value
(controlPlaneMachineSet.GetOwnerReferences()[0].Kind+"/"+controlPlaneMachineSet.GetOwnerReferences()[0].Name);
update the klog.Infof invocation in the same block (the code referencing
controlPlaneMachineSet and GetOwnerReferences()) to reflect this corrected
ordering and keep the early return unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 29253f44-6d22-4260-9602-e5e8da21b9b4
📒 Files selected for processing (3)
pkg/controller/bootimage/boot_image_controller.gopkg/controller/bootimage/cpms_helpers.gopkg/controller/bootimage/ms_helpers.go
🚧 Files skipped from review as they are similar to previous changes (2)
- pkg/controller/bootimage/boot_image_controller.go
- pkg/controller/bootimage/ms_helpers.go
6409e62 to
d0665d7
Compare
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
|
/retest |
|
@djoshy: This pull request references MCO-2151 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.22.0" version, but no target version was set. DetailsIn response to this:
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
left a comment
There was a problem hiding this comment.
/lgtm
Change seems fair to me, thanks @djoshy 🎉
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: djoshy, isabella-janssen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
/retest |
|
/test all |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
@djoshy: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
- What I did
Added stream label detection for the boot image controller. If no label is found, it is considered an older pre "dual stream" machineset/controlplanemachineset and is updated for backwards compatibility. If a label is found, it is checked against the currently supported stream in the boot image controller, and then reconciled if it is a match.
I also took this opportunity to clean up a couple of unrelated logs/comments.
- How to verify it
All existing bootimage e2es should pass.
rhel-10stream:For bonus points, you could use a
rhel-10boot image for AWS/GCP from here. Adding arhel-10bootimage for Azure/vSphere is slightly more involved than editing in a reference, but should work as well. This is not strictly required since this code is platform agnostic.rhel-9stream:Note: On AWS, if you've used a
rhel-10AMI in step (2), set it back to anyrhel-9AMI. This is because the boot image controller uses a whitelist for updates and therhel-10AMI wouldn't be in the whitelist; resulting in a skipped update.rhel-9bootimage defined by rhcos.json.Summary by CodeRabbit