Title: CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern · Issue #1673 · coder/coder · GitHub
Open Graph Title: CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern · Issue #1673 · coder/coder
X Title: CLI: getting "Validation failed name: username" error in cli in case workspace or template name does not follow allowed pattern · Issue #1673 · coder/coder
Description: OS Information OS: Windows 10 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...
Open Graph Description: OS Information OS: Windows 10 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 te...
X Description: OS Information OS: Windows 10 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 "[...
Opengraph URL: https://github.com/coder/coder/issues/1673
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CLI: getting \"Validation failed name: username\" error in cli in case workspace or template name does not follow allowed pattern","articleBody":"## OS Information\r\n\r\n- OS: Windows 10\r\n- `coder --version`:\r\nCoder v0.5.10+ba818b3 Wed May 18 00:07:20 UTC 2022\r\nhttps://github.com/coder/coder/commit/ba818b3a10aa364073c90a217631dd1d17c32393\r\n\r\n## Steps to Reproduce\r\n\r\n1. Init any template\r\n2. Run \"coder template create **wrong-name_** -d \"[path to template]\"\r\n3. Set service account key\r\n4. Confirm create? (yes/no) yes\r\n\r\n## Expected\r\n\r\nAny error message that template name has a wrong format is displayed\r\n\r\n## Actual\r\n\r\nstatus code 400: Validation failed\r\n name: username\r\n\r\nThe same for a new worskpace created with CLI.\r\n\r\n## What is your suggestion?\r\n\r\nCurrently 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 -.\"\r\nin CLI the resulting error is:\r\n\r\nstatus code 400: Validation failed\r\n **name: username**\r\n\r\nThat is confusing since this is not username that causes the error, but template name or workspace name in case workspace was created. \r\n\r\n## Logs\r\n\r\n## Screenshot\r\nTemplate error\r\n\r\n\r\n\r\nWorkspace error\r\n\r\n\r\n\r\n\r\n## Notes\r\n\r\n\u003c!-- Anything else you want to share -->\r\n","author":{"url":"https://github.com/nadzeyav","@type":"Person","name":"nadzeyav"},"datePublished":"2022-05-23T16:45:59Z","url":"https://github.com/coder/coder/issues/1673"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3edf9dae-8529-f054-09c1-03af1ca886db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B14:3CBB3E:1BC0252:2359BAD:6B0199EC |
| html-safe-nonce | 0088094cbae543d4e9f39e056a1ec6b7c5d8bba6b6ab0aab779bb08418a9f175 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjE0OjNDQkIzRToxQkMwMjUyOjIzNTlCQUQ6NkIwMTk5RUMiLCJ2aXNpdG9yX2lkIjoiNjg0Nzk3OTc2OTMxMzcyOTAwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49efdb88a8e25f8f12435605def5f4edeb82efa75ad5cb7e6d7bd71146361ea3 |
| hovercard-subject-tag | issue:1245449272 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/1673/issue_layout |
| twitter:image | https://opengraph.githubassets.com/268a591a181041030f2c572e158eb644ed578362fc147938a078ad57ff9e5f84/coder/coder/issues/1673 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/268a591a181041030f2c572e158eb644ed578362fc147938a078ad57ff9e5f84/coder/coder/issues/1673 |
| og:image:alt | OS Information OS: Windows 10 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 te... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nadzeyav |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width