Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-13643

[release-4.12] OLM k8sResourcePrefix x-descriptor dropdown unexpectedly clears selections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.12.z
    • 4.12.z
    • Management Console
    • None
    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-12267. The following is the description of the original issue:

      Description of problem:

      When using the k8sResourcePrefix x-descriptor with custom resource kinds, the form-view dropdown selection currently doesn't accept the initial user selection...requiring the user to make their selection twice. Also...if the configuration panel contains multiple custom resource dropdowns, then each previous dropdown selection on the panel is also cleared each time the user configures another custom resource dropdown, requiring the user to also reconfigure each previous selection.Here's an example of my configuration below:specDescriptors:
                - displayName: Collection
                  path: collection
                  x-descriptors:
                    - >-
                      urn:alm:descriptor:io.kubernetes:abc.zzz.com:v1beta1:Collection
                - displayName: Endpoints
                  path: 'mapping[0].endpoints[0].name'
                  x-descriptors:
                    - >-
                      urn:alm:descriptor:io.kubernetes:abc.zzz.com:v1beta1:Endpoint
                - displayName: Requested Credential Secret
                  path: 'mapping[0].endpoints[0].credentialName'
                  x-descriptors:
                    - 'urn:alm:descriptor:io.kubernetes:Secret'
                - displayName: Namespaces
                  path: 'mapping[0].namespace'
                  x-descriptors:
                    - 'urn:alm:descriptor:io.kubernetes:Namespace'
      With this configuration, when a user wants to select a Collection or Endpoint from the form view dropdown, the user is forced to make their selection twice before the selection is accepted in the dropdown. Also, if the user does configure the Collection dropown, and then decides to configure the Endpoint dropdown, once the Endpoint selection is made, the Collection dropdown is then cleared.

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

      4.8

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a new project: 
        oc new-project descriptor-test
      2. Create the resources in this gist: 
        oc create -f https://gist.github.com/TheRealJon/99aa89c4af87c4b68cd92a544cd7c08e/raw/a633ad172ff071232620913d16ebe929430fd77a/reproducer.yaml
      3. In the admin console, go to the installed operators page in project 'descriptor-test'
      4. Select Mock Operator from the list
      5. Select "Create instance" in the Mock Resource provided API card
      6. Scroll to the field-1
      7. Select 'example-1' from the dropdown

      Actual results:

      Selection is not retained on the first click.

      Expected results:

      The selection should be retained on the first click.

      Additional info:

      In addition to this behavior, if a form has multiple k8sResourcePrefix dropdown fields, they all get cleared when attempting to select an item from one of them.

              rh-ee-jonjacks Jon Jackson
              openshift-crt-jira-prow OpenShift Prow Bot
              Xiyun Zhao Xiyun Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: