Bug 1838756

Summary: operator-sdk bundle validate fails when v1beta crds are present in the bundle
Product: OpenShift Container Platform Reporter: lgallett
Component: OLMAssignee: Vu Dinh <vdinh>
OLM sub component: OLM QA Contact: yhui
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, cmacedo, jesusr, jfan, jiazha, vdinh
Version: 4.5   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1838623 Environment:
Last Closed: 2020-07-13 17:41:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1838623    
Bug Blocks:    

Description lgallett 2020-05-21 17:59:57 UTC
+++ This bug was initially created as a clone of Bug #1838623 +++

Description of problem:

operator-sdk bundle validate fails when v1beta crds are present in the bundle.

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

0.17.1

How reproducible:

always


Steps to Reproduce:

operator-sdk bundle validate registry-proxy.engineering.redhat.com/rh-osbs/amq7-amq-streams-rhel7-operator-metadata:1.0.0-1

(can also use quay.io/galletti94/amq-streams-test:1.0.0-1)


Actual results:

INFO[0000] Unpacked image layers                         bundle-dir=/tmp/bundle-581872145 container-tool=docker
INFO[0000] running docker pull                           bundle-dir=/tmp/bundle-581872145 container-tool=docker
INFO[0004] running docker save                           bundle-dir=/tmp/bundle-581872145 container-tool=docker
FATA[0004] Bundle content validation failed: Bundle validation errors: EOF,cannot convert int64 to float64,cannot convert int64 to float64,cannot convert int64 to float64,cannot convert int64 to float64,cannot convert int64 to float64  bundle-dir=/tmp/bundle-581872145 container-tool=docker


Expected results:

Does not error on type conversion

Additional info:

Comment 3 yhui 2020-05-27 09:57:28 UTC
Version:
operator-sdk version: "v0.17.1", commit: "6d108056f39fa19546cf9235fad6e84b0683114a", kubernetes version: "unknown", go version: "go1.13.10 linux/amd64"

Steps to test:
Using the image Jia built for another bug https://bugzilla.redhat.com/show_bug.cgi?id=1838623 to test.

[root@preserve-olm-env git]# operator-sdk bundle validate quay.io/jfan/memcache-operator-metadata:v0.0.1
INFO[0000] Unpacked image layers                         bundle-dir=/tmp/bundle-737626611 container-tool=docker
INFO[0000] running docker pull                           bundle-dir=/tmp/bundle-737626611 container-tool=docker
INFO[0001] running docker save                           bundle-dir=/tmp/bundle-737626611 container-tool=docker
INFO[0001] All validation tests have completed successfully  bundle-dir=/tmp/bundle-737626611 container-tool=docker

Note: The crd included in the above image is v1beta.
# cat deploy/crds/cache.example.com_memcacheds_crd.yaml 
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: memcacheds.cache.example.com

Verify the bug.

Comment 4 errata-xmlrpc 2020-07-13 17:41:00 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, 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:2409