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:
Editing a CatalogSource or OperatorSource can success without the "--validate=true" option.
I think we should address this issue, raise the P/S.
This PR addresses the bug: https://github.com/operator-framework/operator-marketplace/pull/144
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.
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