Bug 1838623

Summary: operator-sdk bundle validate fails when v1beta crds are present in the bundle
Product: OpenShift Container Platform Reporter: lgallett
Component: Operator SDKAssignee: Eric Stroczynski <estroczy>
Status: CLOSED CURRENTRELEASE QA Contact: Fan Jia <jfan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jesusr, marobrie
Target Milestone: ---Keywords: UpcomingSprint
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:
: 1838756 (view as bug list) Environment:
Last Closed: 2020-06-10 15:39:03 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:
Bug Depends On:    
Bug Blocks: 1838756    

Description lgallett 2020-05-21 13:03:22 UTC
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 4 Fan Jia 2020-05-27 06:58:48 UTC
test env:
operator-sdk version: "v0.17.0-119-gb602297b", commit: "b602297bde0675aee04de0b3115002877ad41e07", kubernetes version: "v1.18.2", go version: "go1.13.5 linux/amd64"

result:
#cat deploy/crds/cache.example.com_memcacheds_crd.yaml 
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: memcacheds.cache.example.com

# operator-sdk bundle validate quay.io/jfan/memcache-operator-metadata:v0.0.1
INFO[0000] Unpacking image layers                       
INFO[0000] running /usr/bin/docker pull quay.io/jfan/memcache-operator-metadata:v0.0.1  bundle-dir=/tmp/bundle-399307567 container-tool=docker
INFO[0043] running docker save                           bundle-dir=/tmp/bundle-399307567 container-tool=docker
INFO[0043] Found annotations file                        bundle-dir=/tmp/bundle-399307567 container-tool=docker
INFO[0043] Could not find optional dependencies file     bundle-dir=/tmp/bundle-399307567 container-tool=docker
INFO[0043] All validation tests have completed successfully

Comment 5 Eric Stroczynski 2020-06-10 15:38:29 UTC
This has been fixed in v0.18.0