Skip to content

Wizard: add the container installer official image (HMS-11165) - #4738

Closed
lucasgarfield wants to merge 2 commits into
lucas/cockpit/4-target-syncfrom
lucas/cockpit/5-container-installer
Closed

Wizard: add the container installer official image (HMS-11165)#4738
lucasgarfield wants to merge 2 commits into
lucas/cockpit/4-target-syncfrom
lucas/cockpit/5-container-installer

Conversation

@lucasgarfield

Copy link
Copy Markdown
Collaborator

Adds the RHEL 10.3 container installer ISO as a selectable official image, with a second read-only container section for its payload.

  • Add the container installer (bootable-container-iso) to the official on-prem images
  • Selecting its target environment shows a second read-only container section for the payload image, with its own pull button
  • Default the payload reference via resolveOfficialImage; flow it to the CLI through the existing bootc argument helper
  • Require both installer and payload images pulled before building
  • Hide the registration step and reset registration type when the installer is selected — subscriptions aren't supported for it
  • Translate the installer type to the CLI's name (bootc-generic-iso, not bootable-container-iso) so the build unit doesn't fail
  • Resolves Add the container ISO installer (HMS-11165) #4714

Stack created with GitHub Stacks CLIGive Feedback 💬

@lucasgarfield
lucasgarfield requested a review from a team as a code owner August 10, 2026 17:54
@lucasgarfield
lucasgarfield requested review from ksiekl, mgold1234 and regexowl and removed request for a team August 10, 2026 17:54

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue, and left some high level feedback:

  • In useImagePullValidation, the payload image existence logic duplicates much of the primary image path; consider extracting a small helper to encapsulate the needsPayload / loading / error branches so future changes (e.g., different payload rules) only need to be implemented once.
  • The installer and payload image references are hard-coded in multiple places (tests and KNOWN_IMAGES); centralizing these strings (or deriving the test constants from KNOWN_IMAGES) would reduce the risk of drift if the registry paths change.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `useImagePullValidation`, the payload image existence logic duplicates much of the primary image path; consider extracting a small helper to encapsulate the `needsPayload` / loading / error branches so future changes (e.g., different payload rules) only need to be implemented once.
- The installer and payload image references are hard-coded in multiple places (tests and `KNOWN_IMAGES`); centralizing these strings (or deriving the test constants from `KNOWN_IMAGES`) would reduce the risk of drift if the registry paths change.

## Individual Comments

### Comment 1
<location path="src/store/slices/wizard/listeners.ts" line_range="158" />
<code_context>
+
+  // The container installer needs a payload container; default to the
+  // one the selected official image ships with.
+  const payloadRef = selected.iso_payload_references?.[0];
+  if (
+    targetType === 'bootable-container-iso' &&
</code_context>
<issue_to_address>
**issue (bug_risk):** Guard against `selected` being undefined when deriving `payloadRef`.

Here `selected` is treated as always defined, but `KNOWN_IMAGES.find(...)` can return `undefined`. Since the optional chaining only applies to `iso_payload_references`, accessing `selected.iso_payload_references` will throw if `selected` is undefined.

Consider updating this to:
```ts
const payloadRef = selected?.iso_payload_references?.[0];
```
to avoid a runtime error when no matching image is found.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


// The container installer needs a payload container; default to the
// one the selected official image ships with.
const payloadRef = selected.iso_payload_references?.[0];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Guard against selected being undefined when deriving payloadRef.

Here selected is treated as always defined, but KNOWN_IMAGES.find(...) can return undefined. Since the optional chaining only applies to iso_payload_references, accessing selected.iso_payload_references will throw if selected is undefined.

Consider updating this to:

const payloadRef = selected?.iso_payload_references?.[0];

to avoid a runtime error when no matching image is found.

@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch from 3be3d70 to 0b95eda Compare August 10, 2026 18:17
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.15385% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.39%. Comparing base (1b3b16f) to head (358a62e).

Files with missing lines Patch % Lines
...ents/CreateImageWizard/utilities/useValidation.tsx 30.00% 7 Missing ⚠️

Impacted file tree graph

@@                       Coverage Diff                       @@
##           lucas/cockpit/4-target-sync    #4738      +/-   ##
===============================================================
- Coverage                        79.22%   78.39%   -0.84%     
===============================================================
  Files                              264      264              
  Lines                             7004     7016      +12     
  Branches                          2576     2583       +7     
===============================================================
- Hits                              5549     5500      -49     
- Misses                            1358     1437      +79     
+ Partials                            97       79      -18     
Flag Coverage Δ
playwright 58.70% <20.00%> (-2.01%) ⬇️
vitest 74.00% <46.15%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/ImageSourceSelect/OnPrem/OfficialImageSource.tsx 90.00% <100.00%> (+4.28%) ⬆️
...ents/CreateImageWizard/utilities/useValidation.tsx 87.10% <30.00%> (-1.27%) ⬇️

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b3b16f...358a62e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch from 0b95eda to c15dec4 Compare August 11, 2026 11:18
@croissanne
croissanne force-pushed the lucas/cockpit/5-container-installer branch from c15dec4 to 672de56 Compare August 11, 2026 12:39
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch from 672de56 to 3ccac49 Compare August 11, 2026 13:46
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch 2 times, most recently from 0b95eda to f83bd2a Compare August 12, 2026 11:53
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch from f83bd2a to 39693b2 Compare August 12, 2026 12:53
The image-builder CLI calls the installer ISO bootc-generic-iso, not
bootable-container-iso; passing the frontend alias made the build unit
fail before producing any output. Add the pair to the existing
frontend/backend type maps.
Add the RHEL 10.3 container installer (bootable-container-iso) to the
official on-prem images. Selecting its target environment shows a
second read-only container section for the payload - the base image
the installer deploys - with its own pull button. The payload
reference is stored in the wizard state, defaulted by the
resolveOfficialImage listener when the installer type is selected, and
flows to the image-builder CLI via the existing bootc argument helper.

Building needs both containers in local storage, so the pull
validation now requires the payload to be pulled as well as the
installer image, with the same logged-out copy pointing at the
registry login.

Subscriptions are not supported for the installer iso: the existing
per-type restrictions hide the registration step and reset the
registration type when it is selected.

Resolves #4714
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/5-container-installer branch from 39693b2 to 358a62e Compare August 13, 2026 15:23
@lucasgarfield

Copy link
Copy Markdown
Collaborator Author

Replaced by #4756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the container ISO installer (HMS-11165)

1 participant