Description of problem:
oc-mirror v1 and v2 do not mirror multiple channels for the same operator
Version-Release number of selected component (if applicable):
4.19
How reproducible:
Always
Steps to Reproduce:
1. Setup an `ImageSetConfiguration` file with the following contents ``` mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 packages: - name: rhbk-operator defaultChannel: stable-v22.0 channels: - name: stable-v22.0 minVersion: 22.0.9-opr.1 defaultChannel: stable-v26.0 channels: - name: stable-v26.0 minVersion: 26.0.7-opr.1 ``` 2. Kick off an oc-mirror v1 or v2 job from registry.redhat.io to a local disk location 3. Mirror the contents from disk to a local Quay registry
Actual results:
Both oc-mirror v1 and v2 only mirror the second default channel ### oc-mirror v1 ### $ oc-mirror list operators --package rhbk-operator --catalog mirror-dr.syangsao.net:8443/erie/redhat/redhat-operator-index:v4.16 NAME DISPLAY NAME DEFAULT CHANNEL rhbk-operator Red Hat build of Keycloak Operator stable-v26.0 PACKAGE CHANNEL HEAD rhbk-operator stable-v26.0 rhbk-operator.v26.0.7-opr.1 $ oc-mirror list operators --package rhbk-operator --channel stable-v26.0 --catalog mirror-dr.syangsao.net:8443/erie/redhat/redhat-operator-index:v4.16 VERSIONS 26.0.7-opr.1 Above output for oc-mirror v1 only grabs 1 image version from 1 channel only. ### oc-mirror v2 ### $ oc-mirror list operators --package rhbk-operator --catalog mirror-dr.syangsao.net:8443/erie2/redhat/redhat-operator-index:v4.16 NAME DISPLAY NAME DEFAULT CHANNEL rhbk-operator Red Hat build of Keycloak Operator stable-v26.0 PACKAGE CHANNEL HEAD rhbk-operator stable-v26.0 rhbk-operator.v26.0.15-opr.1 $ oc-mirror list operators --package rhbk-operator --channel stable-v26.0 --catalog mirror-dr.syangsao.net:8443/erie2/redhat/redhat-operator-index:v4.16 VERSIONS 26.0.8-opr.1 26.0.13-opr.1 26.0.15-opr.1 26.0.7-opr.1 26.0.9-opr.1 26.0.10-opr.1 26.0.11-opr.1 26.0.12-opr.1 26.0.14-opr.1 Above output for oc-mirror v2 grabs the specified version and above, which is expected behavior, other than not grabbing the images from stable-v22.0.
Expected results:
Both options should grab images from the both the `stable-v22.0` and `stable-v26.0` channels that are above the minVersion(s) that are specified in the `ImageSetConfiguration` file
Additional info:
$ oc-mirror version Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.19.0-202507101307.p0.g9283907.assembly.stream.el9-9283907", GitCommit:"9283907f659b8196cf0a9a45b9c4b0016edb25d5", GitTreeState:"clean", BuildDate:"2025-07-10T13:56:48Z", GoVersion:"go1.23.9 (Red Hat 1.23.9-1.el9_6) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
- duplicates
-
OCPBUGS-60571 oc-mirror v2 should validate ImageSetConfiguration to reject duplicate YAML keys
-
- POST
-