Skip to content

MGMT-18886: OS Streams#10428

Open
giladravid16 wants to merge 1 commit into
openshift:masterfrom
giladravid16:MGMT-18886
Open

MGMT-18886: OS Streams#10428
giladravid16 wants to merge 1 commit into
openshift:masterfrom
giladravid16:MGMT-18886

Conversation

@giladravid16

@giladravid16 giladravid16 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Enhancement to define the implementation of os streams.

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?

Summary by CodeRabbit

  • Documentation
    • Added a new enhancement documentation page for “OS streams,” describing how users can select an OS stream during cluster/host installs (e.g., mapping by OCP version and CPU architecture), planned configuration/API additions, expected image selection behavior, known risks and trade-offs, open questions, and an end-to-end test approach.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 3, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 3, 2026

Copy link
Copy Markdown

@giladravid16: This pull request references MGMT-18886 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Enhancement to define the implementation of os streams.

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

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Walkthrough

This PR adds design documentation for an enhancement to support selecting multiple OS streams per Release Image. The proposal separates OS images from release images into a many-to-many mapping, introduces new API fields for cluster and infraenv selection, extends the Agent kube-api with osStream field, and outlines binding logic updates, automation considerations, risks, and test plans.

Changes

OS Streams Enhancement Proposal

Layer / File(s) Summary
OS streams enhancement proposal
docs/enhancements/os-streams.md
New enhancement design document proposing API fields (os_stream in clusters, os_image_version in infraenvs), a new endpoint for available OS streams, kube-api osStream field in AgentClusterInstalls, and updated early/late-binding selection logic. Includes implementation notes on extracting stream metadata from release payloads, automation design, UI impact analysis for OCP 5.0+, storage growth risks and mitigations, open questions about RHCOS mapping automation, e2e test planning, and alternative design trade-offs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning Two new Ginkgo e2e tests added in subsystem/cluster_test.go assume multi-node clusters: both use MinMasterHostsNeededForInstallationInHaMode (3 master nodes) without SNO skip protection. Add [Skipped:SingleReplicaTopology] label to test names or guard with IsSingleNode() check to skip on SNO deployments.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title 'MGMT-18886: OS Streams' clearly references the Jira issue and identifies the main enhancement about OS streams functionality, which matches the core change documented in the enhancement page.
Description check ✅ Passed The PR description follows the template structure with required sections completed: issue categorization (Enhancement), environment impact (None), testing approach (No tests needed), and checklist items addressed. However, the initial summary is minimal ('Enhancement to define the implementation of os streams') and lacks detailed context about motivation, implementation details, or testing considerations despite these being suggested in the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 PR is documentation-only (docs/enhancements/os-streams.md); no Go test files added or modified, so check is not applicable.
Test Structure And Quality ✅ Passed PR is documentation-only (adds docs/enhancements/os-streams.md); no Ginkgo test code present, so test quality check is not applicable.
Microshift Test Compatibility ✅ Passed This PR adds only documentation (docs/enhancements/os-streams.md) with no new Ginkgo e2e tests. The custom check applies only when new tests are added, so it does not apply here.
Topology-Aware Scheduling Compatibility ✅ Passed This is a documentation-only PR adding a design proposal. No deployment manifests, operator code, controllers, or scheduling constraints are introduced. The check does not apply.
Ote Binary Stdout Contract ✅ Passed This PR is documentation-only (adds docs/enhancements/os-streams.md) with no modifications to executable code or process-level functions (main, init, TestMain, BeforeSuite, AfterSuite). No stdout v...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds only documentation (docs/enhancements/os-streams.md). No new Ginkgo e2e tests were added, so the IPv6/disconnected network compatibility check is not applicable.
No-Weak-Crypto ✅ Passed This PR is documentation-only (adds docs/enhancements/os-streams.md). No code changes, cryptographic algorithms (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto, or token comparisons are p...
Container-Privileges ✅ Passed PR is a documentation-only change adding docs/enhancements/os-streams.md. No container manifests, Kubernetes specs, or privileged container configurations present.
No-Sensitive-Data-In-Logs ✅ Passed Documentation-only PR with no logging statements, passwords, tokens, API keys, PII, session IDs, or sensitive customer data. Example commands use public registries and standard OpenShift tools.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 3, 2026

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/enhancements/os-streams.md (1)

109-113: ⚡ Quick win

Expand the test plan beyond a single e2e path.

Please add coverage expectations for resolver logic (default stream selection, invalid stream, backward-compat with existing osImageVersion, early-binding vs late-binding precedence). This is key risk area for this change.

🤖 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 `@docs/enhancements/os-streams.md` around lines 109 - 113, Update the Test Plan
to enumerate specific coverage expectations for the resolver logic: add test
cases for default stream selection when none provided, handling of
invalid/unknown stream values, backward-compatibility checks ensuring existing
osImageVersion continues to resolve to the same images, and explicit tests for
early-binding vs late-binding precedence (confirm which wins and that conflicts
are surfaced or resolved correctly). Reference the resolver behavior by name
(resolver logic, default stream selection, osImageVersion, early-binding,
late-binding) and state expected outcomes/assertions for each test so
assisted-test-infra updates can implement them.
🤖 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.

Inline comments:
In `@docs/enhancements/os-streams.md`:
- Around line 83-86: The os_image_version field currently has dual semantics
(RHCOS or OCP version) which is ambiguous; update the docs and validation logic
to define explicit resolution rules: implement a resolver (e.g.,
resolve_os_image_version) that first attempts an exact RHCOS match, then falls
back to an exact OCP match only if no RHCOS is found, and otherwise return a
clear validation error; document the precedence, input validation, and the error
behavior (including what happens in late-binding) and add guidance to users to
provide an explicit indicator or use distinct fields if both interpretations are
possible.
- Around line 39-46: The proposal currently uses inconsistent names (os_stream,
os_image_version, osStream) which can cause drift between REST, DB and kube CRD;
standardize and document the exact field names for each surface and migration
strategy: use snake_case for REST/DB (os_stream, os_image_version) or camelCase
for kube CRD (osStream, osImageVersion) consistently, update the API contract in
assisted-service to accept and emit the chosen REST names, update the DB model
to match the REST names, update the kube-api CRD and AgentClusterInstalls to use
the chosen kube names (e.g., osStream/osImageVersion), and add a
migration/deprecation path that accepts legacy variants (map incoming os_stream
↔ osStream and os_image_version ↔ osImageVersion), logs deprecation warnings,
and migrates stored records accordingly; reference os_stream, os_image_version,
osStream, osImageVersion, AgentClusterInstalls, assisted-service and kube-api in
the docs and code changes so all surfaces remain aligned.

---

Nitpick comments:
In `@docs/enhancements/os-streams.md`:
- Around line 109-113: Update the Test Plan to enumerate specific coverage
expectations for the resolver logic: add test cases for default stream selection
when none provided, handling of invalid/unknown stream values,
backward-compatibility checks ensuring existing osImageVersion continues to
resolve to the same images, and explicit tests for early-binding vs late-binding
precedence (confirm which wins and that conflicts are surfaced or resolved
correctly). Reference the resolver behavior by name (resolver logic, default
stream selection, osImageVersion, early-binding, late-binding) and state
expected outcomes/assertions for each test so assisted-test-infra updates can
implement them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 30661950-308a-449d-aafe-beb8c4100084

📥 Commits

Reviewing files that changed from the base of the PR and between eeb25a6 and 139dd57.

📒 Files selected for processing (1)
  • docs/enhancements/os-streams.md

Comment thread docs/enhancements/os-streams.md
Comment thread docs/enhancements/os-streams.md Outdated
Comment on lines +83 to +86
specifies the OCP version and can only be used in late-binding. We can repurpose
this field to match our new `os_image_version` field, but still allow setting it to
the OCP version if the value doesn't match any RHCOS version.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid dual semantics in one field without strict resolution rules.

Allowing os_image_version to mean either “RHCOS version” or “OCP version” is ambiguous and can select the wrong image silently. Define explicit precedence, validation, and error behavior (including what happens when both interpretations are possible).

🤖 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 `@docs/enhancements/os-streams.md` around lines 83 - 86, The os_image_version
field currently has dual semantics (RHCOS or OCP version) which is ambiguous;
update the docs and validation logic to define explicit resolution rules:
implement a resolver (e.g., resolve_os_image_version) that first attempts an
exact RHCOS match, then falls back to an exact OCP match only if no RHCOS is
found, and otherwise return a clear validation error; document the precedence,
input validation, and the error behavior (including what happens in
late-binding) and add guidance to users to provide an explicit indicator or use
distinct fields if both interpretations are possible.

@openshift-ci openshift-ci Bot requested review from danielerez and danmanor June 3, 2026 14:18
@openshift-ci

openshift-ci Bot commented Jun 3, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giladravid16

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 3, 2026
@giladravid16

Copy link
Copy Markdown
Contributor Author

/cc @carbonin @rccrdpccl @danmanor

@openshift-ci openshift-ci Bot requested review from carbonin and rccrdpccl June 3, 2026 14:25

@carbonin carbonin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd really prefer if we could avoid a new map and get the data from the release images.

Comment thread docs/enhancements/os-streams.md Outdated
Comment thread docs/enhancements/os-streams.md Outdated
Comment thread docs/enhancements/os-streams.md Outdated
Comment thread docs/enhancements/os-streams.md Outdated

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

♻️ Duplicate comments (1)
docs/enhancements/os-streams.md (1)

32-38: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin down the cross-surface contract before implementation.

os_stream/osStream and osImageVersion/openshift_version are still described inconsistently, and the fallback from RHCOS to OCP version remains ambiguous. That leaves room for REST, kube-api, admission, and controller code to diverge or silently pick the wrong image. Please specify the exact field name and resolution rules for each surface, plus the migration/deprecation behavior for existing InfraEnv values.

Also applies to: 87-93

🤖 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 `@docs/enhancements/os-streams.md` around lines 32 - 38, Before implementing
the os_stream feature, clarify and document the cross-surface contract by
specifying the exact field names for each surface (REST API uses `os_stream`
while kube-api uses `osStream`), define consistent naming for image version
fields (`osImageVersion` vs `openshift_version`), establish clear resolution
rules for how os_stream is determined and what the fallback mechanism is from
RHCOS to OCP version, and document the migration and deprecation strategy for
existing InfraEnv values to ensure REST, kube-api, admission, and controller
code remain consistent. Include these specifications in the enhancement document
at both the main location and the secondary location (around line 87-93) so all
implementation surfaces follow the same contract.
🤖 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.

Duplicate comments:
In `@docs/enhancements/os-streams.md`:
- Around line 32-38: Before implementing the os_stream feature, clarify and
document the cross-surface contract by specifying the exact field names for each
surface (REST API uses `os_stream` while kube-api uses `osStream`), define
consistent naming for image version fields (`osImageVersion` vs
`openshift_version`), establish clear resolution rules for how os_stream is
determined and what the fallback mechanism is from RHCOS to OCP version, and
document the migration and deprecation strategy for existing InfraEnv values to
ensure REST, kube-api, admission, and controller code remain consistent. Include
these specifications in the enhancement document at both the main location and
the secondary location (around line 87-93) so all implementation surfaces follow
the same contract.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 5fd5d703-3b81-4e00-a087-bde9b6018c05

📥 Commits

Reviewing files that changed from the base of the PR and between 139dd57 and 351d612.

📒 Files selected for processing (1)
  • docs/enhancements/os-streams.md

@openshift-ci

openshift-ci Bot commented Jun 14, 2026

Copy link
Copy Markdown

@giladravid16: 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.

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. 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.

3 participants