Bug 1688540

Summary: [marketplace] RoleBinding, OperatorSource and CatalogSourceConfig fails schema validation
Product: OpenShift Container Platform Reporter: Aravindh Puthiyaparambil <aravindh>
Component: OLMAssignee: Abu Kashem <akashem>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: jiazha, scuppett
Target Milestone: ---   
Target Release: 4.1.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: 2019-06-04 10:45:47 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 Aravindh Puthiyaparambil 2019-03-13 23:06:07 UTC
Description of problem:

Editing a CatalogSource or OperatorSource with the "--validate=true" option results in the following error:


# operatorsources.marketplace.redhat.com "certified-operators" was not valid:
# * : Invalid value: "The edited file failed validation": [ValidationError(OperatorSource.spec): unknown field "displayName" in com.redhat.marketplace.v1alpha1.OperatorSource.spec, ValidationError(OperatorSource.spec): unknown field "publisher" in com.redhat.marketplace.v1alpha1.OperatorSource.spec, ValidationError(OperatorSource): unknown field "status" in com.redhat.marketplace.v1alpha1.OperatorSource]

# catalogsourceconfigs.marketplace.redhat.com "certified-operators" was not valid:
# * : Invalid value: "The edited file failed validation": [ValidationError(CatalogSourceConfig.spec): unknown field "csDisplayName" in com.redhat.marketplace.v1alpha1.CatalogSourceConfig.spec, ValidationError(CatalogSourceConfig.spec): unknown field "csPublisher" in com.redhat.marketplace.v1alpha1.CatalogSourceConfig.spec, ValidationError(CatalogSourceConfig): unknown field "status" in com.redhat.marketplace.v1alpha1.CatalogSourceConfig]
#

How reproducible: Always


Steps to Reproduce:
1. oc edit opsrc <opsrcname> --validate=true

Actual results: The edit does not go through


Expected results: The edit should pass the schema validation and go through


Additional info:

Comment 1 Fan Jia 2019-03-14 02:43:45 UTC
Editing a CatalogSource or OperatorSource can success without the "--validate=true" option.

Comment 2 Jian Zhang 2019-03-14 03:31:57 UTC
I think we should address this issue, raise the P/S.

Comment 4 Abu Kashem 2019-03-27 15:35:59 UTC
This PR addresses the bug: https://github.com/operator-framework/operator-marketplace/pull/144

Comment 6 Fan Jia 2019-04-24 05:23:01 UTC
test env:
cv: 4.1.0-0.nightly-2019-04-23-223857
marketplace: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:62cf61010380bce4876e01c3609cd1af68401a3c0077e2cd2b1f2cfe9e38672e

test result:
opsrc, csc , rolebinding can edit success with "--validate=true" option, and will report the error when you edit the source with invalidate configuration.

Comment 8 errata-xmlrpc 2019-06-04 10:45:47 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-2019:0758