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

YAML editor shows different style in console for configmaps with data exceeding 78 Characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.15.0
    • 4.10.0
    • Management Console
    • None
    • +
    • No
    • False
    • Hide

      None

      Show
      None
    • NA
    • Release Note Not Required
    • In Progress

      Testcases:

       1. Create a configmap from a file with 77 characters in a line

      File data:
      tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
      ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
      tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      
      CLI data:
      
      $ oc get cm cm-test4 -o yaml
      apiVersion: v1
      data:
        cm-test4: |                                                                              ##Noticed the Literal style
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
          eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
          ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      kind: ConfigMap
      metadata:
        creationTimestamp: "2022-09-28T12:39:43Z"
        name: cm-test4
        namespace: configmap-test
        resourceVersion: "8962738"
        uid: cf0e264b-72fb-4df7-bd3a-f3ed62423367
      
      
      UI data:
      
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: cm-test4
        namespace: configmap-test
        uid: cf0e264b-72fb-4df7-bd3a-f3ed62423367
        resourceVersion: '8962738'
        creationTimestamp: '2022-09-28T12:39:43Z'
        managedFields:
          - manager: kubectl-create
            operation: Update
            apiVersion: v1
            time: '2022-09-28T12:39:43Z'
            fieldsType: FieldsV1
            fieldsV1:
              'f:data':
                .: {}
                'f:cm-test4': {}
      data:
        cm-test4: |                                                                      ##Noticed the Literal style
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
          eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
          ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
       

       

      2. Create a configmap from a file with characters more than 78 in a line,

       

      File Data:
      tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
      ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
      tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      
      CLI Data:
      
      $ oc get cm cm-test5 -o yaml
      apiVersion: v1
      data:
        cm-test5: |                                                                              ##Noticed the Literal style
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
          eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
          ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      kind: ConfigMap
      metadata:
        creationTimestamp: "2022-09-28T12:39:54Z"
        name: cm-test5
        namespace: configmap-test
        resourceVersion: "8962813"
        uid: b8b12653-588a-4afc-8ed9-ff7c6ebaefb1
      
      UI data:
      
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: cm-test5
        namespace: configmap-test
        uid: b8b12653-588a-4afc-8ed9-ff7c6ebaefb1
        resourceVersion: '8962813'
        creationTimestamp: '2022-09-28T12:39:54Z'
        managedFields:
          - manager: kubectl-create
            operation: Update
            apiVersion: v1
            time: '2022-09-28T12:39:54Z'
            fieldsType: FieldsV1
            fieldsV1:
              'f:data':
                .: {}
                'f:cm-test5': {}
      data:
        cm-test5: >                                                                         ##Noticed the Folded style and newlines in between data
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
      
          eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
      
          ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
      
          tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt 

      Conclusion:

      When the CM is created with more than 78 characters in a single line the yaml editor in the web UI changes the style to folded and could see newline in between data.

       

       

       

              jhadvig@redhat.com Jakub Hadvig
              jhadvig@redhat.com Jakub Hadvig
              Xiyun Zhao Xiyun Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: