You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run odo push on a folder with devfile. devfile validation fails with the following.
the staticHTML is the name of the folder and I never set a component name.
I think odo is setting the component name from folder name without converting it to be vaid.
❯ odo push
Validation
✗ Failed to start component with name staticHTML. Error: Failed to create the component: component name "staticHTML" is not valid, component name should conform the following requirements:
- Contain at most 63 characters
- Contain only lowercase alphanumeric characters or ‘-’
- Start with an alphanumeric character
- End with an alphanumeric character
- Must not contain all numeric values
Expected behavior
validation does not fail
Any logs, error output, etc?
The text was updated successfully, but these errors were encountered:
I think odo is setting the component name from folder name without converting it to be vaid.
Yes, that is what is happening here :-(
odo needs to convert the directory name into the always valid component name.
odo needs to do the following cleanup before using value as a component name:
convert to lowercase
remove all non-alphanumeric characters except -
if it is all numeric values, prepend it with x
remove all leading and trailing non-alphanumeric characters (because of the 2. step, this can be only -)
/kind bug
What versions of software are you using?
Operating System:
MacOs
Output of
odo version
:odo 2.0.3
How did you run odo exactly?
odo push
Actual behavior
When I run odo push on a folder with devfile. devfile validation fails with the following.
the staticHTML is the name of the folder and I never set a component name.
I think odo is setting the component name from folder name without converting it to be vaid.
❯ odo push Validation ✗ Failed to start component with name staticHTML. Error: Failed to create the component: component name "staticHTML" is not valid, component name should conform the following requirements: - Contain at most 63 characters - Contain only lowercase alphanumeric characters or ‘-’ - Start with an alphanumeric character - End with an alphanumeric character - Must not contain all numeric values
Expected behavior
validation does not fail
Any logs, error output, etc?
The text was updated successfully, but these errors were encountered: