Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oc-mirror produces catalog artifacts with empty channels when imageset config filters operator to specific version #210

Closed
bkkhoo opened this issue Dec 3, 2021 · 1 comment · Fixed by #238
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@bkkhoo
Copy link

bkkhoo commented Dec 3, 2021

Version

$ oc-mirror version
v0.1.0-alpha.3

What happened?

Executing oc-mirror --config imageset-config.yaml file://output-dir with the following config to mirror to directory:

apiVersion: tmp-redhatgov.com/v1alpha1
kind: ImageSetConfiguration
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.9
      headsOnly: false
      packages:
        - name: rhacs-operator
          channels:
          - name: latest
          versions:
          - '3.67.0'

The command completed successfully, but some of the channels have empty entris:

{
    "schema": "olm.channel",
    "name": "rhacs-3.66",
    "package": "rhacs-operator",
    "entries": []
}

opm validate of the catalog show this:

$ opm validate output-dir/oc-mirror-workspace/src/catalogs
FATA[0000] invalid index:
└── invalid package "rhacs-operator":
    ├── invalid channel "rhacs-3.62":
    │   └── channel must contain at least one bundle
    ├── invalid channel "rhacs-3.64":
    │   └── channel must contain at least one bundle
    ├── invalid channel "rhacs-3.65":
    │   └── channel must contain at least one bundle
    └── invalid channel "rhacs-3.66":
        └── channel must contain at least one bundle

What you expected to happen?

Empty channels should be removed, catalog image with empty channels will not run.

@afflom afflom added this to the Tech Preview milestone Dec 3, 2021
@jpower432 jpower432 added the kind/bug Categorizes issue or PR as related to a bug. label Dec 6, 2021
@jpower432
Copy link
Contributor

Linking this PR in operator-registry. Will fix this issue. operator-framework/operator-registry#884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants