Skip to content

Conversation

@pablintino
Copy link
Contributor

- What I did

Replace the single ostree.linux discriminator with configurable label matchers that explicitly classify OS images ostree.bootable, containers.bootc) and extensions images (io.openshift.os.extensions).
Images that match no discriminator now return nil instead of defaulting to extensions.

- How to verify it

Regular CI tests are enough to verify this change.

- Description for the changelog

OS image streams now use explicit label matchers (ostree.bootable, containers.bootc, io.openshift.os.extensions) instead of a single ostree.linux discriminator to classify OS and extensions images

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

openshift-ci-robot commented Feb 11, 2026

@pablintino: This pull request references MCO-2120 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 "4.22.0" version, but no target version was set.

Details

In response to this:

- What I did

Replace the single ostree.linux discriminator with configurable label matchers that explicitly classify OS images ostree.bootable, containers.bootc) and extensions images (io.openshift.os.extensions).
Images that match no discriminator now return nil instead of defaulting to extensions.

- How to verify it

Regular CI tests are enough to verify this change.

- Description for the changelog

OS image streams now use explicit label matchers (ostree.bootable, containers.bootc, io.openshift.os.extensions) instead of a single ostree.linux discriminator to classify OS and extensions images

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-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pablintino

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 Feb 11, 2026
Comment on lines 19 to 24
// coreOSLabelOSTree is the container image label present on ostree-based OS images.
coreOSLabelOSTree = "ostree.bootable"
coreOSLabelOSTreeValue = "true"
// coreOSLabelBootc is the container image label present on bootc-based OS images.
coreOSLabelBootc = "containers.bootc"
coreOSLabelBootcValue = "true"
Copy link
Member

@dustymabe dustymabe Feb 11, 2026

Choose a reason for hiding this comment

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

So. I think we can just use a single label here because containers.bootc is already present even on older (say 4.20) images:

$ skopeo inspect -n docker://quay.io/openshift-release-dev/ocp-v4.0-art-dev:9.6.20260112-0-coreos | jq .Labels
{
  "com.coreos.osname": "rhcos",
  "containers.bootc": "1",
  "coreos-assembler.image-config-checksum": "b444a32e2801642f1e41777fd51fa53304496c58a3a6b15e5964a1f86f866507",
  "io.openshift.build.version-display-names": "machine-os=Red Hat Enterprise Linux CoreOS",
  "io.openshift.build.versions": "machine-os=9.6.20260112-0",
  "org.opencontainers.image.revision": "1fe200e9dd4262baee4947248a91e26b20c37e1a",
  "org.opencontainers.image.source": "https://github.com/coreos/rhel-coreos-config.git",
  "org.opencontainers.image.version": "9.6.20260112-0",
  "ostree.bootable": "true",
  "ostree.commit": "06cf91269a29db6c9f0a27d9dad53efaee790f7231495fe78c4bbec9400504b2",
  "ostree.final-diffid": "sha256:12787d84fa137cd5649a9005efe98ec9d05ea46245fdc50aecb7dd007f2035b1",
  "ostree.linux": "5.14.0-570.78.1.el9_6.x86_64",
  "rpmostree.inputhash": "fe655ed136272c3559660c6d9892ea13d90fb6b435dc6893ab759bc60432d451"
}

and we probably also need to accept multiple values because today I see "containers.bootc": "1" but if they ever change it to true we might want to just be safe:

Suggested change
// coreOSLabelOSTree is the container image label present on ostree-based OS images.
coreOSLabelOSTree = "ostree.bootable"
coreOSLabelOSTreeValue = "true"
// coreOSLabelBootc is the container image label present on bootc-based OS images.
coreOSLabelBootc = "containers.bootc"
coreOSLabelBootcValue = "true"
// coreOSLabelBootc is the container image label present on OS images.
coreOSLabelBootc = "containers.bootc"
coreOSLabelBootcValues = ["true", "1"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I've addresed both comments.

Replace the single ostree.linux discriminator with configurable label
matchers that explicitly classify OS images (ostree.bootable,
containers.bootc) and extensions images (io.openshift.os.extensions).
Images that match no discriminator now return nil instead of defaulting
to extensions.

Signed-off-by: Pablo Rodriguez Nava <[email protected]>
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants