Description of problem:
oc-mirror tool is not detecting the package that exist in the catalog, the customer is trying to use oc mirror to generate a manifest only (no mirroring performed, similar output from oc adm mirror --manifest) except filter on a minimum operator version to not pull in the entire lifecycle of the operator (all channels + all versions)
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. create a basic imagesetconfig.yaml ``` kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: local: path: ./ mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14 packages: - name: ansible-automation-platform-operator minVersion: '2.4.0-0.1713467078' ``` 2. ./oc-mirror --config imagesetconfig.yaml file:// --dry-run ```bash Found: oc-mirror-workspace/src/publish Found: oc-mirror-workspace/src/v2 Found: oc-mirror-workspace/src/charts Found: oc-mirror-workspace/src/release-signatures No metadata detected, creating new workspace The rendered catalog is invalid. Run "oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME" for more information. error: Operator ansible-automation-platform-operator was not found, please check name, minVersion, maxVersion, and channels in the config file. ```
Actual results:
oc mirror manifest generation fails on the OLM package "ansible-automation-platform-operator" which is owned/built/maintained by redhat most likely due to a bug of the olm metadata version name not matching the package name. "name": "ansible-automation-platform-operator", "defaultChannel": "stable-2.4-cluster-scoped", "name": "stable-2.4-cluster-scoped", "package": "ansible-automation-platform-operator", "entries": [ { "name": "aap-operator.v2.4.0-0.1702352614", "skipRange": ">=2.0.1-0.1635283332 <2.4.1" Notice how the "entries" package name is aap-operator but the olm package name is "ansible-automation-platform-operator".
Expected results:
oc mirror to generate a manifest of images associated with operator packages we are requesting with their minVersion in the catalog.
Additional info:
- is duplicated by
-
OCPBUGS-37227 oc-mirror tool ignores minVersion and maxVersion for ansible-automation-platform-operator
- New