[release-ocm-2.15] MGMT-23757: Make InfraEnv CpuArchitecture immutable after creation#10104
[release-ocm-2.15] MGMT-23757: Make InfraEnv CpuArchitecture immutable after creation#10104bluesort wants to merge 1 commit intoopenshift:release-ocm-2.15from
Conversation
|
@bluesort: This pull request references MGMT-23757 which is a valid jira issue. 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. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-ocm-2.15 #10104 +/- ##
====================================================
+ Coverage 43.49% 43.51% +0.01%
====================================================
Files 407 407
Lines 70562 70577 +15
====================================================
+ Hits 30691 30711 +20
+ Misses 37137 37134 -3
+ Partials 2734 2732 -2
🚀 New features to boost your workflow:
|
|
/cc @eliorerz |
|
@bluesort did you consider CEL validations instead of webhooks code? |
@rccrdpccl I wasn't aware of CEL validations - they would have been a good fit here. We have other webhook validation that could also be handled with CEL (e.g. ClusterRef and OSImageVersion mutual exclusion), maybe a larger refactor task is warranted? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bluesort, gamli75 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 |
|
@bluesort: all tests passed! 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. |
Changing Spec.CpuArchitecture after InfraEnv creation didn't regenerate boot artifacts, causing download links to point to the wrong architecture (e.g., links still pointed to x86_64 after changing to s390x). This fix makes Spec.CpuArchitecture immutable by adding webhook validation that rejects any attempts to modify the field after creation, preventing the inconsistent state.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs, README, etc)Reviewers Checklist