Description of problem: Trying to validate a bundle yields the error per subect: {"error":"PackageValidationError","message":"Failed to push manifest: Resulting bundle is invalid, input yaml is improperly defined.","status":400,"validation_info":{"errors":["CRD.spec.version does not match CSV.spec.crd.owned.version"],"warnings":["csv metadata.annotations.createdAt not defined","csv spec.icon not defined","csv metadata.annotations.createdAt not defined","csv spec.icon not defined","csv metadata.annotations.createdAt not defined","csv spec.icon not defined"]}} Our CSV looks like this: https://github.com/openshift-kni/performance-addon-operators/blob/master/deploy/olm-catalog/performance-addon-operator/4.6.0/performance-addon-operator.v4.6.0.clusterserviceversion.yaml#L52 note two CRD versions here Our CRD looks like this: https://github.com/openshift-kni/performance-addon-operators/blob/master/deploy/olm-catalog/performance-addon-operator/4.6.0/performance.openshift.io_performanceprofiles_crd.yaml#L13 note two versions here
Proposed fix: https://github.com/operator-framework/operator-courier/pull/194
Version: [root@preserve-olm-env yhui]# operator-courier -v 2.1.9 There is no sub-command `operator-courier validate` in this version. Get the help information of `operator-courier` as follows. [root@preserve-olm-env bug]# operator-courier -h usage: operator-courier [-h] [-v] [--verbose] {verify,push,nest,flatten} ... Build, verify and push operator bundles into external app registry optional arguments: -h, --help show this help message and exit -v, --version Show the current version of operator-courier --verbose Provide detailed logs subcommands: {verify,push,nest,flatten} verify Create a bundle and test it for correctness. push Create a bundle, test it, and push it to an app registry. nest Take a flat to-be-bundled directory and version nest it. flatten Create a flat directory from versioned operator bundle yaml files. [root@preserve-olm-env bug]# operator-courier verify -h usage: operator-courier verify [-h] [--ui_validate_io] [--validation-output VALIDATION_OUTPUT] source_dir Build and verify an operator bundle to test positional arguments: source_dir Path of your directory of yaml files to bundle. Either set this or use the files argument for bundle data. optional arguments: -h, --help show this help message and exit --ui_validate_io Validate bundle for operatorhub.io UI. To visually confirm that your operator will be displayed correctly, please visit https://operatorhub.io/preview and paste your operator CSV. --validation-output VALIDATION_OUTPUT A file to write validation warnings and errors to in JSON format Choose `operator-courier verify` to verify the bug. Test procedure: 1, Get the manifest bundle: http://pkgs.devel.redhat.com/cgit/containers/performance-addon-operator-dev-operator-metadata/tree/?h=rhaos-4.6-rhel-8 [root@preserve-olm-env bug]# ls container.yaml cvp-owners.yml fetch_manifests rebuild.changelog source-repos update_manifests container.yaml.in Dockerfile get_pullspec.py render_templates store_manifest.py versions.stored content_sets.yml Dockerfile.in performance-operator replace_csv_pullspec.py translate_pullspec.py versions.wanted 2, Verify the bundle. [root@preserve-olm-env bug]# operator-courier verify performance-operator/ WARNING: csv metadata.annotations.createdAt not defined [4.4.0/performance-addon-operator.v4.4.0.clusterserviceversion.yaml] WARNING: csv spec.icon not defined [4.4.0/performance-addon-operator.v4.4.0.clusterserviceversion.yaml] WARNING: csv metadata.annotations.createdAt not defined [4.5.0/performance-addon-operator.v4.5.0.clusterserviceversion.yaml] WARNING: csv spec.icon not defined [4.5.0/performance-addon-operator.v4.5.0.clusterserviceversion.yaml] WARNING: csv metadata.annotations.createdAt not defined [4.6.0/performance-addon-operator.v4.6.0.clusterserviceversion.yaml] WARNING: csv spec.icon not defined [4.6.0/performance-addon-operator.v4.6.0.clusterserviceversion.yaml] There is no error as per bug title. Verify the bug.
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