Uploaded image for project: 'Observability UI'
  1. Observability UI
  2. OU-763

Perses migration fails with complex variable values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • COO 1.3.0
    • None
    • perses-upstream
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 5
    • None
    • None
    • None
    • Sprint 276
    • None
    • None
    • None

      When the variables set in a grafana dashboard contain commas or new lines, the migration to Perses fails to recognize this as a single variable value.

       

      Having these variables from a grafana json:

      "options": [          {            "selected": true,            "text": "All",            "value": "0"          },          {            "selected": false,            "text": "stopped",            "value": "on(cluster,name,namespace) group_left()(0*(sum by(cluster,namespace,name)(kubevirt_vm_non_running_status_last_transition_timestamp_seconds>0)))"          },          {            "selected": false,            "text": "starting",            "value": "on(cluster,name,namespace) group_left()(0*(sum by(cluster, namespace,name)(kubevirt_vm_starting_status_last_transition_timestamp_seconds>0)))"          },          {            "selected": false,            "text": "migrating",            "value": "on(cluster,name,namespace) group_left()(0*(sum by(cluster, namespace,name)(kubevirt_vm_migrating_status_last_transition_timestamp_seconds>0)))"          },          {            "selected": false,            "text": "error",            "value": "on(cluster,name,namespace) group_left()(0*(sum by(cluster,namespace,name)(kubevirt_vm_error_status_last_transition_timestamp_seconds>0)))"          },          {            "selected": false,            "text": "running",            "value": "on(cluster,name,namespace) group_left()(0*(sum by(cluster,namespace,name)(kubevirt_vm_running_status_last_transition_timestamp_seconds>0)))"          } 

      the migrated variable looks like:

      plugin:          kind: StaticListVariable          spec:            values:              - All=0              - stopped:on(cluster              - name              - namespace) group_left()(0*(sum by(cluster              - namespace              - name)(kubevirt_vm_non_running_status_last_transition_timestamp_seconds>0)))              - starting:on(cluster              - name              - namespace) group_left()(0*(sum by(cluster              - namespace              - name)(kubevirt_vm_starting_status_last_transition_timestamp_seconds > 0)))              - migrating:on(cluster              - name              - namespace) group_left() (0*(sum by (cluster              - namespace              - name)(kubevirt_vm_migrating_status_last_transition_timestamp_seconds>0)))              - error:on(cluster              - name              - namespace) group_left()(0*(sum by(cluster              - namespace              - name)(kubevirt_vm_error_status_last_transition_timestamp_seconds>0)))              - running:on(cluster              - name              - namespace) group_left()(0*(sum by(cluster              - namespace              - name)(kubevirt_vm_running_status_last_transition_timestamp_seconds>0))) 

      Which created new values out the commas and new lines and also did not include the value name to be displayed on the dropdown.

      Expected results

      The migration command from percli should respect the commas and new lines that are intended to be concatenated into the query.

      How to Test

      • With the latest version of Perses backend from https://github.com/perses/perses `main`, using the latest version of the StaticListVariablePlugin from https://github.com/perses/plugins `main`
      • Build the percli tool using `make build-cli` on the perses backend
      • Start the perses backend so percli can connect for the migration
      • Use the built percli executable to migrate a complex ACM dashboard. 

              gbernal@redhat.com Gabriel Bernal
              gbernal@redhat.com Gabriel Bernal
              None
              Evelyn Murasaki Evelyn Murasaki
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: