Skip to content

[release-ocm-2.16] MGMT-23756: Make InfraEnv CpuArchitecture immutable after creation#10103

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-ocm-2.16from
bluesort:mgmt-23756
Apr 9, 2026
Merged

[release-ocm-2.16] MGMT-23756: Make InfraEnv CpuArchitecture immutable after creation#10103
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-ocm-2.16from
bluesort:mgmt-23756

Conversation

@bluesort
Copy link
Copy Markdown
Member

@bluesort bluesort commented Apr 2, 2026

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

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 2, 2026

@bluesort: This pull request references MGMT-23756 which is a valid jira issue.

Details

In response to this:

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

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95d294e5-096e-4b3d-8237-72afbb424612

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 2, 2026
@openshift-ci openshift-ci bot requested review from adriengentil and oourfali April 2, 2026 16:39
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.99%. Comparing base (a63230a) to head (ca7e655).
⚠️ Report is 6 commits behind head on release-ocm-2.16.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           release-ocm-2.16   #10103      +/-   ##
====================================================
+ Coverage             43.96%   43.99%   +0.02%     
====================================================
  Files                   415      415              
  Lines                 72040    72055      +15     
====================================================
+ Hits                  31674    31698      +24     
+ Misses                37483    37478       -5     
+ Partials               2883     2879       -4     
Files with missing lines Coverage Δ
...ks/agentinstall/v1beta1/infraenv_admission_hook.go 87.50% <100.00%> (+1.36%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bluesort
Copy link
Copy Markdown
Member Author

bluesort commented Apr 3, 2026

/cc @eliorerz

@openshift-ci openshift-ci bot requested a review from eliorerz April 3, 2026 12:59
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 8, 2026

[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

Details 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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 9, 2026

@bluesort: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 c4655c9 into openshift:release-ocm-2.16 Apr 9, 2026
13 checks passed
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants