Bug 1883329 - Bundle validation shouldn't fail if default channel annotation is now optional
Summary: Bundle validation shouldn't fail if default channel annotation is now optional
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Vu Dinh
QA Contact: Tom Buskey
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-28 19:08 UTC by Vu Dinh
Modified: 2020-10-27 16:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:45:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 459 0 None closed Bug 1883329: Bundle validation shouldn't fail if default channel is not provided 2020-11-25 16:53:23 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:46:14 UTC

Description Vu Dinh 2020-09-28 19:08:01 UTC
Description of problem:
As the default channel annotation is now optional, bundle validation should pass bundles without default channel information.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a bundle image without default channel annotation in annotations.yaml
2. Running opm alpha bundle validate on the built bundle image.

Actual results:
The bundle validation will fail with `Expecting annotation ... to have non-empty value`.

Expected results:
The bundle validation should pass.

Additional info:
This issue is related to https://bugzilla.redhat.com/show_bug.cgi?id=1878213.

Comment 2 Tom Buskey 2020-09-30 18:57:44 UTC
opm version
Version: version.Version{OpmVersion:"v1.14.3", GitCommit:"5f55ec2", BuildDate:"2020-09-30T16:32:36Z", GoOs:"linux", GoArch:"amd64"}


opm alpha bundle build --directory cockroachdb/2.0.9 --tag quay.io/tbuskey/cockroachdb:2.0.9 -p cockroachdb 
INFO[0000] Bundle channels information not provided, inferring from parent package directory 
Error: please manually input channels and packageName, error interpreting bundle from directory /home/tbuskey/go/src/github.com/operator-framework/community-operators/community-operators/cockroachdb/2.0.9, error geting CSVs from bundles in the package directory, no ClusterServiceVersion object found in /home/tbuskey/go/src/github.com/operator-framework/community-operators/community-operators/cockroachdb/metadata

opm alpha bundle build --directory cockroachdb/2.0.9 --tag quay.io/tbuskey/cockroachdb:2.0.9 -p cockroachdb  -c alpha
INFO[0000] Building annotations.yaml           
Successfully tagged quay.io/tbuskey/cockroachdb:2.0.9

docker push quay.io/tbuskey/cockroachdb:2.0.9

opm alpha bundle validate --tag quay.io/tbuskey/cockroachdb:2.0.9
DEBU[0001] Validating "operators.coreos.com/v1alpha1, Kind=ClusterServiceVersion" from file "cockroachdb.v2.1.1.clusterserviceversion.yaml"  container-tool=docker
DEBU[0001] Validating "apiextensions.k8s.io/v1beta1, Kind=CustomResourceDefinition" from file "cockroachdbs.charts.helm.k8s.io.crd.yaml"  container-tool=docker
INFO[0001] All validation tests have been completed successfully  container-tool=docker

Comment 5 errata-xmlrpc 2020-10-27 16:45:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.