Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-9441

[CLI & UI] [QOL] Set character limit on Approval Task comments

XMLWordPrintable

      Description of problem:

      The tkn-approvaltask CLI allows users to input approval comments (-m) of indefinite length without any validation. When a user inputs an excessively long string, the tkn-approvaltask describe command attempts to render the full string in the "Message" column.

      Similarly in the UI, while approving the approval task there is a reason box to provide the comments.

      This results in a flooded terminal window, breaking the table formatting and making it difficult to read other details of the approval task.

      Prerequisites (if any, like setup, operators/versions):

      OSP 1.21.0

      Steps to Reproduce

      • Identify a pending Approval Task.
      • Approve the task using the CLI with a massive message string
         
        tkn-approvaltask approve <task-name> -n <namespace> -m "$(for i in {1..2000}; do echo -n 'K'; done)"
      • Run the describe command to view the status:
        tkn-approvaltask describe <task-name> -n <namespace>

      Actual results:

      • The CLI should enforce a reasonable character limit
      • If long messages are allowed, the describe command should truncate the message in the table view 

      Expected results:

      The CLI accepts the full string length. The describe output dumps the entire string into the console, spamming the terminal and rendering the Approver response table unreadable

      Additional info (Such as Logs, Screenshots, etc):

      Attached screenshot below

       *

        1. Screenshot From 2025-11-26 23-42-09.png
          82 kB
          Sri Vignesh Selvan
        2. Screenshot From 2025-11-27 00-25-15.png
          16 kB
          Sri Vignesh Selvan

              Unassigned Unassigned
              rhn-support-sselvan Sri Vignesh Selvan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: