Bug 1680070

Summary: CatalogSourceConfig is unable to handle packages with spaces
Product: OpenShift Container Platform Reporter: Aravindh Puthiyaparambil <aravindh>
Component: OLMAssignee: Aravindh Puthiyaparambil <aravindh>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: low Docs Contact:
Priority: low    
Version: 4.1.0CC: aravindh
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Code was not accounting for spaces used in addition to , for separation in the packages field Consequence: Correct set of packages were not be resolved Fix: Account for spaces Result: Correct set of packages with space and , for separation are being resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:44:26 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-02-22 16:38:14 UTC
If the "packages" in the spec of a CatalogSourceConfig has spaces, it does not get resolved properly nor is an error thrown


Steps to Reproduce:
1. Create the following CatalogSourceConfig:
apiVersion: marketplace.redhat.com/v1alpha1
kind: CatalogSourceConfig
metadata:
  name: installed-community-operators
  namespace: openshift-marketplace
spec:
  targetNamespace: openshift-operators
  packages: descheduler, jaeger
2. oc apply -f 

Actual results:
CatalogSourceConfig does not should resolve correctly

Expected results:
CatalogSourceConfig should resolve correctly

Comment 1 Fan Jia 2019-02-28 06:38:32 UTC
1.testenv:
clusterversion: 4.0.0-0.nightly-2019-02-27-213933
marketplace image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:db3741fada8ffb0417e20b58781d2028a17c2c7697c0965b248b6af8501ef312

2. the situation won't happen any more, if the csc's packages has spaces or end with ',' the csc will stay at status "Configuring" and the phase message "Still resolving package(s) - XXXX. Please make sure these are valid packages."

Comment 2 Fan Jia 2019-02-28 06:52:10 UTC
(In reply to Fan Jia from comment #1)

Comment 3 Aravindh Puthiyaparambil 2019-03-01 00:00:43 UTC
This is to allow a CatalogSourceConfig like the one you have specified to succeed. We should not penalize the user for adding spaces in between.

https://github.com/operator-framework/operator-marketplace/pull/121

Comment 4 Fan Jia 2019-03-06 06:54:37 UTC
the lastest clusterversion marketplace's commit is "aabac93da42773f29c4230bd8b7906facc6c42f9" (doesn't include this pr), will test after this pr is included

Comment 5 Fan Jia 2019-03-11 07:49:20 UTC
test with the upstream image,and the function is ok now,will test when the new nightly payload is ok
marketplaceimage commit:5a98c3c3c3e3482b5507ffef2c73a59f703fc10b

Comment 8 errata-xmlrpc 2019-06-04 10:44:26 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