Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-23158

oc mirror with minVersion doesn't work as expected

XMLWordPrintable

    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When I create a ImageSetConfiguration with minVersion set, oc mirror loads the specified version instead of the latest available operator version

      Version-Release number of selected component (if applicable):

      $ oc mirror version
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.14.0-202310201027.p0.g68cf97e.assembly.stream-68cf97e", GitCommit:"68cf97ec715ad2d78fb2bac411a118709c191719", GitTreeState:"clean", BuildDate:"2023-10-20T23:48:14Z", GoVersion:"go1.20.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
      

      How reproducible:

      always

      Steps to Reproduce:

      1. Create the following ImageSetConfiguration and save it as minver.yaml:
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.13
          packages:
          - name: jaeger-product
            channels:
            - name: stable
              minVersion: '1.42.0-5'
      
      2. oc mirror --config=minver.yaml file://minver
      

      Actual results:

      Only version v1.42.0-5 of jaeger-operator gets mirrored.
      Checked with
      $ grep jaeger-operator minver/oc-mirror-workspace/src/catalogs/registry.redhat.io/redhat/redhat-operator-index/v4.13/index/index.json
      "name": "jaeger-operator.v1.42.0-5",

      Expected results:

      The latest available version of jaeger-operator, v1.47.1-5, is mirrored.

      Additional info:

      When I remove the minVersion field in the ImageSetConfiguration, the latest version is mirrored, i.e. it works as expected without the minVersion field.

      Slack ref: https://redhat-internal.slack.com/archives/C02JW6VCYS1/p1699450658063789

            skhoury@redhat.com Sherine Khoury
            agerstma@redhat.com Andreas Gerstmayr
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: