Skip to content

OKD-419: Add missing variant check for SCOS - #6371

Open
SupremeMortal wants to merge 1 commit into
openshift:mainfrom
SupremeMortal:scos-variant-check
Open

OKD-419: Add missing variant check for SCOS#6371
SupremeMortal wants to merge 1 commit into
openshift:mainfrom
SupremeMortal:scos-variant-check

Conversation

@SupremeMortal

@SupremeMortal SupremeMortal commented Aug 5, 2026

Copy link
Copy Markdown

Newer OKD releases use the centos ID with the coreos variant, similar to RHEL. This resolves issues with extensions not applying when an operator MachineConfig contains them.

Summary by CodeRabbit

  • Bug Fixes
    • Improved operating system detection so CentOS Stream CoreOS is correctly recognized as an Enterprise Linux variant.
    • Added support for the CentOS OS identifier, helping the app classify this platform more accurately.

Copilot AI lite review requested due to automatic review settings August 5, 2026 12:51
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Walkthrough

The OS release package adds the centos identifier and classifies CentOS Stream CoreOS as an Enterprise Linux variant in OperatingSystem.IsEL.

Changes

CentOS Stream CoreOS detection

Layer / File(s) Summary
Extend Enterprise Linux classification
pkg/daemon/osrelease/osrelease.go
Adds the centos OS identifier and updates IsEL to recognize CentOS Stream CoreOS.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: copilot, djoshy

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 The pull request changes only osrelease.go and adds no Ginkgo test declarations or test files, so no test title can be unstable.
Test Structure And Quality ✅ Passed The PR modifies only osrelease.go (adding a centos OS identifier). No Ginkgo test code changes are present. The existing test file uses testify framework, not Ginkgo. The check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. The PR only modifies pkg/daemon/osrelease/osrelease.go to add centos OS identifier support. The custom check applies only to new tests and is not applicable here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only pkg/daemon/osrelease/osrelease.go and adds no Ginkgo e2e tests, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The patch only changes OS-release classification in pkg/daemon/osrelease; it adds no deployment, replica, affinity, selector, taint, topology, or PDB scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The OTE main has no process-level stdout writes; OTE config routes GinkgoWriter to os.Stderr, and linked test logging uses GinkgoWriter. The PR changes only osrelease logic.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request changes only osrelease classification logic and adds no Ginkgo e2e tests or networking/external connectivity code.
No-Weak-Crypto ✅ Passed The PR diff adds only a CentOS constant and an IsEL condition; it contains no weak-crypto algorithm, crypto API, custom crypto, or secret comparison.
Container-Privileges ✅ Passed This PR modifies only Go source code (pkg/daemon/osrelease/osrelease.go), not Kubernetes manifests or container configuration files. The container-privileges check is not applicable.
No-Sensitive-Data-In-Logs ✅ Passed The commit only adds CentOS classification logic in osrelease.go. It adds no logging calls, log imports, or sensitive-data output.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: adding the missing SCOS variant check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 5, 2026
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hi @SupremeMortal. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

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

Pull request overview

Updates host OS detection to treat OKD/SCOS nodes that report ID=centos with VARIANT_ID=coreos as an Enterprise Linux CoreOS variant, so extension-handling logic (e.g., rpm-ostree extensions) applies correctly on newer OKD releases.

Changes:

  • Add centos to the set of recognized OS IDs.
  • Extend OperatingSystem.IsEL() to return true for ID=centos when VARIANT_ID=coreos.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/daemon/osrelease/osrelease.go
Comment thread pkg/daemon/osrelease/osrelease.go

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

🧹 Nitpick comments (1)
pkg/daemon/osrelease/osrelease.go (1)

121-121: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a regression case for CentOS Stream CoreOS.

Add a table-driven case in pkg/daemon/osrelease/osrelease_test.go with id=centos, variantID=coreos, and IsEL: true. This locks in the new classification.

🤖 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 `@pkg/daemon/osrelease/osrelease.go` at line 121, Add a table-driven regression
case in the osrelease tests for a CentOS Stream CoreOS release, using id=centos
and variantID=coreos and asserting IsEL is true. Place it alongside the existing
classification cases and preserve the current test structure.
🤖 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.

Nitpick comments:
In `@pkg/daemon/osrelease/osrelease.go`:
- Line 121: Add a table-driven regression case in the osrelease tests for a
CentOS Stream CoreOS release, using id=centos and variantID=coreos and asserting
IsEL is true. Place it alongside the existing classification cases and preserve
the current test structure.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: b53b19a4-93a5-4e11-9e72-4fbd4aef3b43

📥 Commits

Reviewing files that changed from the base of the PR and between a08e3d2 and 2de8163.

📒 Files selected for processing (1)
  • pkg/daemon/osrelease/osrelease.go

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Newer OKD releases use the "centos" ID with the "coreos" variant, similar to RHEL. This resolves issues with extensions not applying when an operator contains them.
@jatinsu

jatinsu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 5, 2026
@jatinsu

jatinsu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/retest-required

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

/lgtm

This seems like a fair change

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift
/test tls-pqc-readiness

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2026
@isabella-janssen

isabella-janssen commented Aug 7, 2026

Copy link
Copy Markdown
Member

/retitle OKD-419: Add missing variant check for SCOS
/retest-required

@openshift-ci openshift-ci Bot changed the title Add missing variant check for SCOS OKD-419: Add missing variant check for SCOS Aug 7, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@SupremeMortal: This pull request references OKD-419 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Newer OKD releases use the centos ID with the coreos variant, similar to RHEL. This resolves issues with extensions not applying when an operator MachineConfig contains them.

Summary by CodeRabbit

  • Bug Fixes
  • Improved operating system detection so CentOS Stream CoreOS is correctly recognized as an Enterprise Linux variant.
  • Added support for the CentOS OS identifier, helping the app classify this platform more accurately.

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.

@Prashanth684

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: isabella-janssen, Prashanth684, SupremeMortal

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

@TwoDCube

TwoDCube commented Aug 7, 2026

Copy link
Copy Markdown
Member

/verified by TestOSRelease, @SupremeMortal

The unit test verifies the change and the author provided, they tested themselves: https://kubernetes.slack.com/archives/C06FF6342RG/p1786113645486919?thread_ts=1785935745.819979&cid=C06FF6342RG

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@TwoDCube: This PR has been marked as verified by TestOSRelease,@SupremeMortal.

Details

In response to this:

/verified by TestOSRelease, @SupremeMortal

The unit test verifies the change and the author provided, they tested themselves: https://kubernetes.slack.com/archives/C06FF6342RG/p1786113645486919?thread_ts=1785935745.819979&cid=C06FF6342RG

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD f6aefa6 and 2 for PR HEAD 0ffff0b in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 8499975 and 1 for PR HEAD 0ffff0b in total

@openshift-ci

openshift-ci Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@SupremeMortal: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/perfscale-control-plane-6nodes 0ffff0b link false /test perfscale-control-plane-6nodes
ci/prow/tls-pqc-readiness 0ffff0b link true /test tls-pqc-readiness

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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants