-
Bug
-
Resolution: Duplicate
-
Normal
-
4.13.0
-
Moderate
-
No
-
ODC Sprint 232
-
1
-
Rejected
-
False
-
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
- Go to "Import From Git"
- Add repository "https://github.com/kdubois/s2i-dotnetcore.git"
- Click on "Show Advanced Git Options"
- Context dir: "/app"
- Select Builder image eg. "6.0-ubi8"
Actual results:
- The "Create" is greyed out without any error message.
- Observe the value of the Name field: "s-2-i-dotnetcore-git"
- 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."
- Observe that the error message does not correspond to an issue in the string
- Remove the 2nd character of the string: "s2-i-dotnetcore-git"
- 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:
- duplicates
-
OCPBUGS-9214 Create button is disabled in Git Import form when git repo url has hyphens in owner part of the url
- Closed