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

Import from Git - Name validation isn't working correctly

    XMLWordPrintable

Details

    • Moderate
    • ODC Sprint 232
    • 1
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

    Description

      Description of problem:

      In the "import from Git" form the "name" field validator isn't working correctly.  When I supply a git repository eg. https://github.com/kdubois/s2i-dotnetcore.git it will auto-populate the name field with the value "s-2-i-dotnetcore-git".  This should validate but in fact the "Create" button at the end of the form doesn't activate, even though there is no error shown. 

       

      When further investigating it looks like the validator is not happy with the hyphen character ("-")  in the 2nd position.  If I change the name, I do get a validation error for the name field, but there's nothing in the error message that indicates it is not allowed to put a hyphen character in the 2nd position. 

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

      Steps to Reproduce

      1. Go to "Import From Git"
      2. Add repository "https://github.com/kdubois/s2i-dotnetcore.git"
      3. Click on "Show Advanced Git Options"
        1. Context dir: "/app"
      4. Select Builder image eg. "6.0-ubi8"

      Actual results:

      1. The "Create" is greyed out without any error message.
      2. Observe the value of the Name field: "s-2-i-dotnetcore-git"
      3. if you activate the field you'll finally see an error message: "Name must consist of lower-case letters, numbers and hyphens. It must start with a letter and end with a letter or number."
      4. Observe that the error message does not correspond to an issue in the string
      5. Remove the 2nd character of the string: "s2-i-dotnetcore-git"
      6. Now the validation error goes away and the "Create" button activates

      Expected results:

      I should be able to either create the application with the string "s-2-i-dotnetcore-git" OR there should be a validation error that shows the correct error.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      OCP 4.12.0

      Workaround:

      Change the name (once you're aware of what the issue is)

      Additional info:

      Attachments

        Issue Links

          Activity

            People

              viraj-1 Vikram Raj
              kdubois1@redhat.com Kevin Dubois (Inactive)
              Sanket Pathak Sanket Pathak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: