Bug 1883329

Summary: Bundle validation shouldn't fail if default channel annotation is now optional
Product: OpenShift Container Platform Reporter: Vu Dinh <vdinh>
Component: OLMAssignee: Vu Dinh <vdinh>
OLM sub component: OLM QA Contact: Tom Buskey <tbuskey>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:45:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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