Bug 1688540 - [marketplace] RoleBinding, OperatorSource and CatalogSourceConfig fails schema validation
Summary: [marketplace] RoleBinding, OperatorSource and CatalogSourceConfig fails schem...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.1.0
Assignee: Abu Kashem
QA Contact: Fan Jia
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-13 23:06 UTC by Aravindh Puthiyaparambil
Modified: 2019-06-04 10:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-06-04 10:45:47 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 0 None None None 2019-06-04 10:45:54 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.