Bug 1872919

Summary: Static plugin - doesn't handle Operand (Custom Resource) creation page URL correctly
Product: OpenShift Container Platform Reporter: tony.wu
Component: Console Storage PluginAssignee: Bipul Adhikari <badhikar>
Status: CLOSED ERRATA QA Contact: Persona non grata <nobody+410372>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.6CC: aos-bugs, badhikar, ebenahar, hnallurv, nthomas
Target Milestone: ---   
Target Release: 4.6.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: 2020-10-27 16:34:36 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:
Attachments:
Description Flags
1_URL_with__clusterserviceversion__.png
none
2_URL_with__operators.coreos.com~v1alpha1~ClusterServiceVersion__.png
none
With operators.coreos.com_v1alpha1_ClusterServiceVersion in url none

Description tony.wu 2020-08-26 22:55:51 UTC
Created attachment 1712746 [details]
1_URL_with__clusterserviceversion__.png

Description of problem:

With 'initialization-resource' CSV annotation, the console will direct users to "Operand Creation form" page for that specific custom resource.
However, it's noticed the "static plugin" doesn't handle the Operand form view's URL correctly to cover the fully qualified resource reference.

"NG" URL - "initialization-resource" CSV annotation:
[CLUSTER_URL]/k8s/ns/tony/operators.coreos.com~v1alpha1~ClusterServiceVersion/ocs-operator.v4.4.2/ocs.openshift.io~v1~StorageCluster/~new

--> See screenshot: 2_URL_with__operators.coreos.com~v1alpha1~ClusterServiceVersion__.png

"OK" URL - OCS team custom one:
[CLUSTER_URL]/k8s/ns/tony/clusterserviceversions/ocs-operator.v4.2.2/ocs.openshift.io~v1~StorageCluster/~new

--> See screenshot: 1_URL_with__clusterserviceversion__.png

Per Sam Padgett:
The plugin should handle both URLs, although the link probably should use the fully qualified resource reference.


Version-Release number of selected component (if applicable):
4.6/4.5


How reproducible:
100%


Steps to Reproduce:
1. Install OCS Operator (OpenShift Container Storage) from 'OperatorHub page'

2. Go to 'OpenShift Container Storage' Operator details page once it's installed.

3. Click on "Create Instance" of the "Storage Cluster" card
    --> See the custom creation form view from the plugin
    --> See screenshot: 1_URL_with__clusterserviceversion__.png

4. Replace the "/clusterserviceversions/" in the URL with "/operators.coreos.com~v1alpha1~ClusterServiceVersion/"
    --> See the regular creation form view from OLM UI
    --> See screenshot: 
2_URL_with__operators.coreos.com~v1alpha1~ClusterServiceVersion__.png



Actual results:
The step 4. above (the same URL as "initialization-resource" CSV annotation use) is showing regular creation form view from OLM UI but not the static plugin one.


Expected results:
The step 4. above should be showing the same view as the one in step 3.  (from static plugin)


Additional info:
See the attached screenshots for references.

Comment 1 tony.wu 2020-08-26 22:56:06 UTC
Created attachment 1712747 [details]
2_URL_with__operators.coreos.com~v1alpha1~ClusterServiceVersion__.png

Comment 4 Persona non grata 2020-09-25 10:41:54 UTC
Created attachment 1716580 [details]
With operators.coreos.com_v1alpha1_ClusterServiceVersion in url

With ocp 4.6.0-0.nightly-2020-09-25-034954, followed the steps provided. Working as expected. Moving the bug to Verified

Comment 6 errata-xmlrpc 2020-10-27 16:34:36 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 (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