Skip to content

OCPBUGS-93368: Simplify IRI api dependency - #10528

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
andfasano:relax-iri-api-dependency
Jun 29, 2026
Merged

OCPBUGS-93368: Simplify IRI api dependency#10528
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
andfasano:relax-iri-api-dependency

Conversation

@andfasano

@andfasano andfasano commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This patch simplifies the InternalReleaseImage api dependency, since only the IRI manifest presence check is required.

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
  • [X ] 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)

Assisted-by: Claude

Summary by CodeRabbit

  • Bug Fixes
    • Installation and bootstrap configuration updates now run consistently, improving reliability during cluster setup (no longer dependent on feature-gate evaluation).
    • Internal manifest handling was streamlined to more reliably detect required resources and avoid skipping needed patching.
  • Tests
    • Updated ignition manifest and internal release image patcher tests to reflect the new always-on behavior and improved “resource found” detection logic.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jun 26, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@andfasano: This pull request references Jira Issue OCPBUGS-93368, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This patch simplifies the InternalReleaseImage api dependency, since only the IRI manifest presence check is required.

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
  • [X ] 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)

Assisted-by: Claude

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

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 912f455b-3b2c-4b8b-bb2a-4d68bc0e6dc6

📥 Commits

Reviewing files that changed from the base of the PR and between c7ff491 and 5dfab63.

⛔ Files ignored due to path filters (15)
  • vendor/github.com/openshift/api/features/features.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/features/legacyfeaturegates.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/features/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/Makefile is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_internalreleaseimage.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_osimagestream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (4)
  • internal/ignition/installmanifests.go
  • internal/ignition/installmanifests_test.go
  • internal/ignition/internalreleaseimage_patcher.go
  • internal/ignition/internalreleaseimage_patcher_test.go
💤 Files with no reviewable changes (1)
  • internal/ignition/installmanifests_test.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • internal/ignition/internalreleaseimage_patcher_test.go
  • internal/ignition/installmanifests.go
  • internal/ignition/internalreleaseimage_patcher.go

Walkthrough

The PR removes feature-gate-based branching from ignition manifest generation and updates internal release image handling to track manifest presence with iriFound. Related tests were adjusted to use the new flow.

Changes

Ignition manifest patching

Layer / File(s) Summary
Unconditional ignition patching
internal/ignition/installmanifests.go, internal/ignition/installmanifests_test.go
patchInternalReleaseManifests and updateBootstrap now always call g.iriPatcher, Generate no longer stores install-config bytes, and the feature-gate test block was removed.
IRI presence tracking
internal/ignition/internalreleaseimage_patcher.go, internal/ignition/internalreleaseimage_patcher_test.go
internalReleaseImagePatcher now records manifest presence with iriFound, unmarshals a minimal manifest header, uses sigs.k8s.io/yaml for marshaling, and updates tests to set the boolean directly.

Sequence Diagram(s)

sequenceDiagram
  participant installerGenerator
  participant patchInternalReleaseManifests
  participant iriPatcher
  participant updateBootstrap
  installerGenerator->>patchInternalReleaseManifests: call
  patchInternalReleaseManifests->>iriPatcher: PatchManifests(...)
  installerGenerator->>updateBootstrap: call
  updateBootstrap->>iriPatcher: UpdateBootstrap(config)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: simplifying the InternalReleaseImage API dependency.
Description check ✅ Passed The description includes the change summary, issue type, impacted environments, and test note, which covers the template well enough.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The touched Ginkgo titles are static string literals; no titles embed UUIDs, timestamps, IPs, or other run-varying data.
Test Structure And Quality ✅ Passed PASS: The modified Ginkgo tests use BeforeEach/AfterEach cleanup, have no Eventually/Consistently waits, and the PR mainly removes feature-gate test code.
Microshift Test Compatibility ✅ Passed PASS: The PR only adds internal ignition unit tests; no new e2e specs or MicroShift-incompatible OpenShift resources/features were introduced.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Touched Ginkgo specs are unit-style tests in internal/ignition; no new multi-node/HA e2e assumptions were added, and the SNO case already targets single-node behavior.
Topology-Aware Scheduling Compatibility ✅ Passed Touched ignition manifest patchers only; no deployment, controller, topology, affinity, nodeSelector, PDB, or replica logic was added.
Ote Binary Stdout Contract ✅ Passed PASS: The touched ignition files only change IRI patching/tests; no new fmt.Print/println, klog stdout, or TestMain/BeforeSuite setup was added in process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new e2e Ginkgo tests were added; the diff only removes feature-gate unit tests and refactors internal ignition code, with no public-internet or IPv6-hostile networking.
No-Weak-Crypto ✅ Passed PASS: The touched ignition files use no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, no custom crypto, and no non-constant-time secret compares.
Container-Privileges ✅ Passed Touched files are Go logic only; no changed manifests or privilege/securityContext settings were present in the PR files.
No-Sensitive-Data-In-Logs ✅ Passed Reviewed the changed files; logs are generic manifest/cluster messages and do not expose passwords, tokens, API keys, PII, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 26, 2026
@openshift-ci
openshift-ci Bot requested review from avishayt and tsorya June 26, 2026 15:53
@openshift-ci-robot

Copy link
Copy Markdown

@andfasano: This pull request references Jira Issue OCPBUGS-93368, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

This patch simplifies the InternalReleaseImage api dependency, since only the IRI manifest presence check is required.

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
  • [X ] 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)

Assisted-by: Claude

Summary by CodeRabbit

  • Bug Fixes
  • Installation and bootstrap configuration updates now run consistently, improving reliability during cluster setup.
  • Manifest handling was streamlined to better detect when required resources are present, reducing cases where updates could be skipped unexpectedly.

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 coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/ignition/internalreleaseimage_patcher.go (1)

147-166: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reset iriFound before scanning the current manifests.

Line 165 only ever sets the flag to true; it never clears a previous match. A reused patcher or retry with a different manifest set can still pass the Line 186 and Line 332 gates after the IRI manifest is no longer present.

Proposed fix
 func (i *internalReleaseImagePatcher) getInternalReleaseImageManifest(ctx context.Context, manifestFiles []s3wrapper.ObjectInfo) error {
+	i.iriFound = false
 	for _, f := range manifestFiles {
 		content, err := i.getManifestContent(ctx, f.Path)

Also applies to: 186-188, 330-333

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/ignition/internalreleaseimage_patcher.go` around lines 147 - 166,
Reset the internalReleaseImagePatcher state before each manifest scan so stale
matches do not leak across retries or reused instances. In
getInternalReleaseImageManifest, clear i.iriFound at the start of the scan
before looping over manifestFiles, then continue setting it to true only when
the iriKind/iriInstanceName match is found. This ensures the later checks in the
same patcher flow that depend on i.iriFound reflect the current manifest set
only.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@internal/ignition/internalreleaseimage_patcher.go`:
- Around line 147-166: Reset the internalReleaseImagePatcher state before each
manifest scan so stale matches do not leak across retries or reused instances.
In getInternalReleaseImageManifest, clear i.iriFound at the start of the scan
before looping over manifestFiles, then continue setting it to true only when
the iriKind/iriInstanceName match is found. This ensures the later checks in the
same patcher flow that depend on i.iriFound reflect the current manifest set
only.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 65fb22e0-1247-4579-9bf8-c6a7214d563b

📥 Commits

Reviewing files that changed from the base of the PR and between fa8eb3d and c7ff491.

📒 Files selected for processing (4)
  • internal/ignition/installmanifests.go
  • internal/ignition/installmanifests_test.go
  • internal/ignition/internalreleaseimage_patcher.go
  • internal/ignition/internalreleaseimage_patcher_test.go
💤 Files with no reviewable changes (1)
  • internal/ignition/installmanifests_test.go

@pawanpinjarkar

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.35%. Comparing base (fa8eb3d) to head (5dfab63).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
internal/ignition/installmanifests.go 33.33% 1 Missing and 1 partial ⚠️
internal/ignition/internalreleaseimage_patcher.go 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10528      +/-   ##
==========================================
- Coverage   44.36%   44.35%   -0.01%     
==========================================
  Files         423      423              
  Lines       73574    73541      -33     
==========================================
- Hits        32640    32620      -20     
+ Misses      38000    37989      -11     
+ Partials     2934     2932       -2     
Files with missing lines Coverage Δ
internal/ignition/internalreleaseimage_patcher.go 67.84% <90.90%> (+0.43%) ⬆️
internal/ignition/installmanifests.go 56.48% <33.33%> (-0.19%) ⬇️

... and 3 files with indirect coverage changes

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

@andfasano
andfasano force-pushed the relax-iri-api-dependency branch from c7ff491 to 5dfab63 Compare June 26, 2026 16:23
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@andfasano

Copy link
Copy Markdown
Contributor Author

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)

internal/ignition/internalreleaseimage_patcher.go (1)> 147-166: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reset iriFound before scanning the current manifests.
Line 165 only ever sets the flag to true; it never clears a previous match. A reused patcher or retry with a different manifest set can still pass the Line 186 and Line 332 gates after the IRI manifest is no longer present.

Proposed fix

 func (i *internalReleaseImagePatcher) getInternalReleaseImageManifest(ctx context.Context, manifestFiles []s3wrapper.ObjectInfo) error {
+	i.iriFound = false
 	for _, f := range manifestFiles {
 		content, err := i.getManifestContent(ctx, f.Path)

Also applies to: 186-188, 330-333

🤖 Prompt for AI Agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/ignition/internalreleaseimage_patcher.go` around lines 147 - 166,
Reset the internalReleaseImagePatcher state before each manifest scan so stale
matches do not leak across retries or reused instances. In
getInternalReleaseImageManifest, clear i.iriFound at the start of the scan
before looping over manifestFiles, then continue setting it to true only when
the iriKind/iriInstanceName match is found. This ensures the later checks in the
same patcher flow that depend on i.iriFound reflect the current manifest set
only.

🤖 Prompt for all review comments with AI agents

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@internal/ignition/internalreleaseimage_patcher.go`:
- Around line 147-166: Reset the internalReleaseImagePatcher state before each
manifest scan so stale matches do not leak across retries or reused instances.
In getInternalReleaseImageManifest, clear i.iriFound at the start of the scan
before looping over manifestFiles, then continue setting it to true only when
the iriKind/iriInstanceName match is found. This ensures the later checks in the
same patcher flow that depend on i.iriFound reflect the current manifest set
only.

ℹ️ Review info

The patcher is created fresh per cluster in NewGenerator() and getInternalReleaseImageManifest is only called once per instance from PatchManifests. There's no reuse or retry path — the field starts as false (zero value) and can only go to true.

@andfasano

Copy link
Copy Markdown
Contributor Author

/assign @danielerez

@bfournie

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2026
@danielerez

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano, danielerez

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 Jun 28, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD fa8eb3d and 2 for PR HEAD 5dfab63 in total

@andfasano

Copy link
Copy Markdown
Contributor Author

/test edge-subsystem-kubeapi-aws

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

@andfasano: 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 7844aeb into openshift:master Jun 29, 2026
22 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@andfasano: Jira Issue OCPBUGS-93368: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-93368 has been moved to the MODIFIED state.

Details

In response to this:

This patch simplifies the InternalReleaseImage api dependency, since only the IRI manifest presence check is required.

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
  • [X ] 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)

Assisted-by: Claude

Summary by CodeRabbit

  • Bug Fixes
  • Installation and bootstrap configuration updates now run consistently, improving reliability during cluster setup (no longer dependent on feature-gate evaluation).
  • Internal manifest handling was streamlined to more reliably detect required resources and avoid skipping needed patching.
  • Tests
  • Updated ignition manifest and internal release image patcher tests to reflect the new always-on behavior and improved “resource found” detection logic.

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.

@andfasano

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@andfasano: new pull request created: #10539

Details

In response to this:

/cherry-pick release-4.22

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-merge-robot

Copy link
Copy Markdown

Fix included in release 5.0.0-0.nightly-2026-06-29-195240

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/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants