Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-6125

Quay 3.10 new UI should validate the input tag name when create new tag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • quay-v3.10.0, quay-v3.15.1
    • quay-ui
    • False
    • Hide

      None

      Show
      None
    • False

      Description:

      This is an issue found when trying to crate a new Tag on Quay 3.10 new UI, when input long tag name(e.g. 140 characters), Quay new UI report error message "Can't create new Tag", checked the API response found the max supported length is 128 characters, so Quay new UI should validate the input and block the request to Quay backend when the input tag name is not valid, and give users reasonable error message like "tag name is too long, max length is 128 Characters",

      Pls review this issue.

      Quay: quay-operator-bundle-container-v3.10.0-113

      Python3:

      >>> len("ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkkkk")

      140

      The API response of create new tag:

      PUT https://quayregistry.apps.quaytest-1517.qe.devcluster.openshift.com/api/v1/repository/quay/demo/tag/ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkkkk
      
      400 error code
      
      {"message": "Invalid tag: must match [A-Za-z0-9_.-], NOT start with \".\" or \"-\", and can contain 1-128 characters"}
       
      Can't create new tag with long name:

              Unassigned Unassigned
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: