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
{{ message }}
Repository navigation
CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern #1673
coder --version:
Coder v0.5.10+ba818b3 Wed May 18 00:07:20 UTC 2022 ba818b3
Steps to Reproduce
Init any template
Run "coder template create wrong-name_ -d "[path to template]"
Set service account key
Confirm create? (yes/no) yes
Expected
Any error message that template name has a wrong format is displayed
Actual
status code 400: Validation failed
name: username
The same for a new worskpace created with CLI.
What is your suggestion?
Currently if Workspace Name or Template Name does not match names rules: "Name must start with a-Z or 0-9 and can contain a-Z, 0-9 or -."
in CLI the resulting error is:
status code 400: Validation failed name: username
That is confusing since this is not username that causes the error, but template name or workspace name in case workspace was created.
changed the title [-]Bug: CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern[/-][+]CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern[/+]on Jun 7, 2022
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
This issue will be fixed by #3390, once merged, the output will look like this:
> Confirm create? (yes/no)
Validation failed.
- name: Validation failed for tag "template_name" with value: "wrong-name_"
Run 'coder templates create --help' for usage.
Activity
[-]Bug: CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern[/-][+]CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern[/+]github-actions commentedon Aug 7, 2022
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
mafredri commentedon Aug 8, 2022
This issue will be fixed by #3390, once merged, the output will look like this: