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

opm index add default channel issue #387

Closed
J0zi opened this issue Jul 14, 2020 · 6 comments
Closed

opm index add default channel issue #387

J0zi opened this issue Jul 14, 2020 · 6 comments
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.

Comments

@J0zi
Copy link

J0zi commented Jul 14, 2020

Hi, we have an issue with opm index add here https://github.com/J0zi/community-operators/blob/RHO-644-cockroachdb/upstream-community-operators/cockroachdb/cockroachdb.package.yaml
I put everything to channels and opm complains:
bundles="[kind-registry:5000/test-operator/cockroachdb:v2.0.9 kind-registry:5000/test-operator/cockroachdb:v2.1.1 kind-registry:5000/test-operator/cockroachdb:v2.1.11 kind-registry:5000/test-operator/cockroachdb:v3.0.7]" error="error loading bundle from image: Error adding package error loading bundle into db: no default channel specified for cockroachdb" Error: error loading bundle from image: Error adding package error loading bundle into db: no default channel specified for cockroachdb
as you see, default channel is here
command used /tmp/operator-test/bin/opm index add -u docker --bundles kind-registry:5000/test-operator/cockroachdb:v2.0.9,kind-registry:5000/test-operator/cockroachdb:v2.1.1,kind-registry:5000/test-operator/cockroachdb:v2.1.11,kind-registry:5000/test-operator/cockroachdb:v3.0.7 --tag kind-registry:5000/test-operator/index:latest --mode replaces

opm version 1.13

@J0zi
Copy link
Author

J0zi commented Jul 15, 2020

looks like there is an issue, that despite default channel defined (3.x), older version is in multiple channels (stable and 2.x) and the tool has no mechanism to set default channel. I propose to use the first one (stable) as default. So contributor can set default by moving package entry up. Could you please @Bowenislandsong have a look? Thank you.

@Bowenislandsong
Copy link
Member

I think it is up to you which channel should be considered the default. According to the pacakge.yaml it should have been the stable-3.x. I assume none of the bundle images in the cmd listed there have the default channel set in there. We expect the first bundle image to contain the default image and then the following bundle images are ok to ignore it unless the default channel is changing.

I am under the impression that this is related to #386. In this case, the package.yaml is specifying the correct name and the bundle image should, therefore, infer successfully and contain the default channel. While the default channel is not a required field in generating all bundle images, we should have at least one bundle to point out the default when initializing the package in an index.

@stale
Copy link

stale bot commented Sep 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 18, 2020
@openshift-ci-robot openshift-ci-robot added the triage/unresolved Indicates an issue that can not or will not be resolved. label Sep 19, 2020
@stale stale bot removed the wontfix label Sep 19, 2020
@stale
Copy link

stale bot commented Nov 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jan 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 19, 2021
@ecordell
Copy link
Member

#503 with this change, the default channel is always specified by the highest semver-version bundle in the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

No branches or pull requests

4 participants