* feat(cli): add template create validation test
This adds a test to validate that `template create` prints an error
message if called with a template name exceeding the 32-char limit.
* fixup
* fixup test
* feat(cli): add name validation to templatecreate
This adds a validation step to ensure the template name is less than 32
characters.
* fixup!: use utf8.RuneCountInString
* fixup!: remove pty from test
* prompt for confirmation before deleting templates (#2830)
* populate templateNames from the interactive picker too
* allow skipping delete confirmation prompt with --yes flag
* eliminate unnecessary newline
* test both confirmation of delete and `--yes` with no confirmation
* fix failing test that needed --yes
* remove unnecessary empty line the linter disliked
* make the tests correct
This PR adds fields to templates that constrain values for workspaces derived from that template.
- Autostop: Adds a field max_ttl on the template which limits the maximum value of ttl on all workspaces derived from that template. Defaulting to 168 hours, enforced on edits to workspace metadata. New workspaces will default to the templates's `max_ttl` if not specified.
- Autostart: Adds a field min_autostart_duration which limits the minimum duration between successive autostarts of a template, measured from a single reference time. Defaulting to 1 hour, enforced on edits to workspace metadata.
* Read params from file for template/workspace creation
* Use os.ReadFile
* Refactor reading params into a separate module
* Add comments and unit tests
* Rename variable
* Uncomment and fix unit test
* Fix comment
* Refactor tests
* Fix unit tests for windows
* Fix unit tests for Windows
* Add comments for the hotfix
* Improve CLI documentation
* feat: Allow workspace resources to attach multiple agents
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:
`coder ssh <workspace>.<agent>`
A resource can have zero agents too, they aren't required.
* Add tree view
* Improve table UI
* feat: Allow workspace resources to attach multiple agents
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:
`coder ssh <workspace>.<agent>`
A resource can have zero agents too, they aren't required.
* Rename `tunnel` to `skip-tunnel`
This command was `true` by default, which causes
a confusing user experience.
* Add disclaimer about editing templates
* Add help to template create
* Improve workspace create flow
* Add end-to-end test for config-ssh
* Improve testing of config-ssh
* Fix workspace list
* Fix config ssh tests
* Update cli/configssh.go
Co-authored-by: Cian Johnston <public@cianjohnston.ie>
* Fix requested changes
* Remove socat requirement
* Fix resources not reading in TTY
Co-authored-by: Cian Johnston <public@cianjohnston.ie>
Customer feedback indicated projects was a confusing name.
After querying the team internally, it seemed unanimous
that it is indeed a confusing name.
Here's for a lil less confusion @ashmeer7 🥂