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

    • 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.

       

       

       

            [OCPBUGS-19546] YAML editor shows different style in console for configmaps with data exceeding 78 Characters

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Critical: OpenShift Container Platform 4.15.0 bug fix and security update), 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/RHSA-2023:7198

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Critical: OpenShift Container Platform 4.15.0 bug fix and security update), 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/RHSA-2023:7198

            The docs team is preparing the bug text for the 4.15 release notes. Based on the fix and affects version, this bug needs to be included in the release notes. Please update your issue by 2/12.

            Set the Release Note Type to Bug Fix and provide the Release Note Text in the following format:

            Cause: What actions or circumstances cause this bug to present.
            Consequence: What happens when the bug presents.
            Fix: What was done to fix the bug.
            Result: Bug doesn’t present anymore.

            If your bug was actually found and fixed in 4.15 or should be internal only, set the Release Note Type to Release Note Not Required.

            Kathryn Alexander added a comment - The docs team is preparing the bug text for the 4.15 release notes. Based on the fix and affects version, this bug needs to be included in the release notes. Please update your issue by 2/12. Set the Release Note Type to Bug Fix and provide the Release Note Text in the following format: Cause : What actions or circumstances cause this bug to present. Consequence : What happens when the bug presents. Fix : What was done to fix the bug. Result : Bug doesn’t present anymore. If your bug was actually found and fixed in 4.15 or should be internal only, set the Release Note Type to Release Note Not Required .

            Xiyun Zhao added a comment -

            This bug has been verified on payload 4.15.0-0.ci-2023-09-25-165744

            Verification step:

            1. Create the ConfigMap by using the YAML file provide in the description
            2. Check the data with different setting could be shown on console UI as expected: 1. Data is more than 78 characters in a single line.  2. Remove the Literal style symbol, check 3 Edit the data from 77 ->78 characters  

            Result:

            the newline in between data is gone

            Xiyun Zhao added a comment - This bug has been verified on payload 4.15.0-0.ci-2023-09-25-165744 Verification step: Create the ConfigMap by using the YAML file provide in the description Check the data with different setting could be shown on console UI as expected: 1. Data is more than 78 characters in a single line.  2. Remove the Literal style symbol, check 3 Edit the data from 77 ->78 characters   Result: the newline in between data is gone

              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: