Closed
Description
Seen here: https://github.com/coder/coder/actions/runs/7450851731/job/20271003673
rename_test.go:39: 2024-01-08 17:24:58.901: cmd: matched "confirm rename:" = "WARNING: A rename can result in data loss if a resource references the workspace\r\nname in the template (e.g volumes). Please backup any data before proceeding.\r\n\r\nSee: https://coder.com/docs/coder-oss/latest/templates/resource-persistence#%EF%B8%8F-persistence-pitfalls\r\n\r\n> Type \"condescending-chandrasekhar5-FWP\" to confirm rename:"
rename_test.go:40: 2024-01-08 17:24:58.901: cmd: stdin: "condescending-chandrasekhar5-FWP\r"
ptytest.go:131: 2024-01-08 17:24:58.901: cmd: "> Type \"condescending-chandrasekhar5-FWP\" to confirm rename: condescending-chandrasekhar5-FWP"
t.go:84: 2024-01-08 17:24:58.903 [debu] PATCH host=localhost:38019 path=/api/v2/workspaces/7ea3ca65-e5dc-40bd-b66e-ff50acb95878 proto=HTTP/1.1 remote_addr=127.0.0.1 start="2024-01-08T17:24:58.901952379Z" took=1.106695ms status_code=400 latency_ms=1 request_id=7765b196-846d-[491](https://github.com/coder/coder/actions/runs/7450851731/job/20271003673#step:5:492)0-8479-dc41f1b854d9
clitest.go:251: command "coder rename" exited with error: running command "coder rename": rename workspace:
github.com/coder/coder/v2/cli.(*RootCmd).rename.func1
/home/runner/actions-runner/_work/coder/coder/cli/rename.go:52
- PATCH http://localhost:38019/api/v2/workspaces/7ea3ca65-e5dc-40bd-b66e-ff50acb95878: unexpected status code 400: Validation failed.
name: Validation failed for tag "username" with value: "condescending-chandrasekhar5-FWPt"
clitest.go:162:
Error Trace: /home/runner/actions-runner/_work/coder/coder/cli/clitest/clitest.go:162
/opt/hostedtoolcache/go/1.21.5/x64/src/runtime/asm_amd64.s:1650
Error: Received unexpected error:
running command "coder rename": rename workspace:
github.com/coder/coder/v2/cli.(*RootCmd).rename.func1
/home/runner/actions-runner/_work/coder/coder/cli/rename.go:52
- PATCH http://localhost:38019/api/v2/workspaces/7ea3ca65-e5dc-40bd-b66e-ff50acb95878: unexpected status code 400: Validation failed.
name: Validation failed for tag "username" with value: "condescending-chandrasekhar5-FWPt"