Commit Graph

29 Commits

Author SHA1 Message Date
Ammar Bandukwala 2bd6d2908e
feat: convert entire CLI to clibase (#6491)
I'm sorry.
2023-03-23 17:42:20 -05:00
Kyle Carberry df31636e72
feat: pass `access_token` to `coder_git_auth` resource (#6713)
This allows template authors to leverage git auth to perform
custom actions, like clone repositories.
2023-03-22 19:37:08 +00:00
Marcin Tojek db40c29f26
fix: CLI do not ignore autostop (#6647)
* fix: CLI do not ignore autostop

* make gen
2023-03-17 18:14:46 +01:00
Marcin Tojek 1f9ae15409
feat: CLI use multiselect for list(string) (#6631)
* feat: CLI use multiselect for list(string)

* fix

* select ui tests

* cli test

* Fix

* Fix
2023-03-16 17:17:48 +01:00
Kyle Carberry 7f226d4f90
feat: add support for `coder_git_auth` data source (#6334)
* Add git auth providers schema

* Pipe git auth providers to the schema

* Add git auth providers to the API

* Add gitauth endpoint to query authenticated state

* Add endpoint to query git state

* Use BroadcastChannel to automatically authenticate with Git

* Add error validation for submitting the create workspace form

* Fix panic on template dry-run

* Add tests for the template version Git auth endpoint

* Show error if no gitauth is configured

* Add gitauth to cliui

* Fix unused method receiver

* Fix linting errors

* Fix dbauthz querier test

* Fix make gen

* Add JavaScript test for git auth

* Fix bad error message

* Fix provisionerd test race

See https://github.com/coder/coder/actions/runs/4277960646/jobs/7447232814

* Fix requested changes

* Add comment to CreateWorkspacePageView
2023-02-27 10:18:19 -06:00
Ammar Bandukwala f05609b4da
chore: format Go more aggressively 2023-02-18 18:32:09 -06:00
Kyle Carberry 71a893764e
chore: remove `CreateAnotherUserWithUser` (#6068)
This was not idiomatic Go!
2023-02-06 23:48:21 +00:00
Marcin Tojek 26c69525d1
feat: Validate workspace build parameters (#5807) 2023-01-24 14:22:00 +01:00
Marcin Tojek bbb208e29c
feat: Add CLI support for workspace build parameters (#5768)
* WIP

* WIP

* CLI: handle workspace build parameters

* fix: golintci

* Fix: dry run

* fix

* CLI: is mutable

* coderd: mutable

* fix: golanci

* fix: richParameterFile

* CLI: create unit tests

* CLI: update test

* Fix

* fix: order

* fix
2023-01-23 15:01:22 +01:00
Ricky Grassmuck f7baf45ae3
feat: support partial parameter files (#5392)
Fixes https://github.com/coder/coder/issues/5390
2022-12-13 19:58:57 -06:00
Ammar Bandukwala 95fb59696e
Refactor Provisioner to distinguish Plan and Apply (#5036) 2022-11-11 16:45:58 -06:00
Kyle Carberry 67c4605370
chore: Reduce test times (#3856)
* chore: Reduce test times

* Rename IncludeProvisionerD to IncludeProvisionerDaemon

* Make  TestTemplateDAUs use Tailnet
2022-09-04 11:28:09 -05:00
Mathias Fredriksson 4730c589fe
chore: Use standardized test timeouts and delays (#3291) 2022-08-01 15:45:05 +03:00
Mathias Fredriksson 7d07e670ca
chore: Improve test cleanup (#3112) 2022-07-22 15:14:45 +03:00
Mathias Fredriksson 3e5affd28a
fix: Increase test timeout for TestCreate/CreateFromListWithSkip (#3077)
Considering database load and CI performance during testing, we should
avoid failing too early.
2022-07-20 17:51:33 +00:00
Kyle Carberry 69f27efead
fix: Close parameter file before test exit (#2694)
Flake seen here:
https://github.com/coder/coder/runs/7079404499?check_suite_focus=true
2022-06-27 14:42:26 -05:00
Jon Ayers 2353687610
feat: unexpose coderdtest.NewWithAPI (#2613)
* feat: unexpose coderdtest.NewWithAPI
2022-06-27 13:50:52 -05:00
Cian Johnston 1455603505
fix: cli: create: use new autostart format, opt-in by default (#2472) 2022-06-17 20:38:10 +00:00
Spike Curtis 93b1425d85
Stop showing persistent vs ephemeral for resources (#2333)
Signed-off-by: Spike Curtis <spike@coder.com>
2022-06-16 18:36:11 +00:00
Cian Johnston 3e419ddb3d
feat: enforce template-level constraints for TTL and autostart (#2018)
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.
2022-06-07 13:37:45 +01:00
Dean Sheather 6be8a373e0
feat: run a terraform plan before creating workspaces with the given template parameters (#1732) 2022-06-02 00:44:53 +10:00
Steven Masley 363b16af38
fix: Add template read permission node to members (#1712) 2022-05-24 16:35:34 +00:00
Cian Johnston c2f74f3cc2
chore: avoid concurrent usage of t.FailNow (#1683)
* chore: golangci: add linter rule to report usage of t.FailNow inside goroutines
* chore: avoid t.FailNow in goroutines to appease the race detector
2022-05-24 08:58:39 +01:00
Cian Johnston b2020761d9
feat: add default autostart and ttl for new workspaces (#1632)
* database: add autostart_schedule and ttl to InsertWorkspace; make gen
* coderd: workspaces: consume additional fields of CreateWorkspaceRequest
* cli: update: add support for TTL and autostart_schedule
* cli: create: add unit tests
* coder: import  `time/tzdata` for embedded timezone database
* autobuild: fix unit test that only runs with a real db
2022-05-23 23:31:41 +01:00
Steven Masley ad946c3902
feat: Add confirm prompts to some cli actions (#1591)
* feat: Add confirm prompts to some cli actions
- Add optional -y skip. Standardize -y flag across commands
2022-05-20 15:59:04 +00:00
Abhineet Jain 7c3e1a5d97
feat: Read params from file for template/workspace creation (#1541)
* 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
2022-05-20 11:29:10 -04:00
Spike Curtis 1871b09697
feat: in-process provisionerd connection (#1568)
* in-process provisionerd connection

Signed-off-by: Spike Curtis <spike@coder.com>

* disable lint for server.go/newProvisionerDaemon

Signed-off-by: Spike Curtis <spike@coder.com>
2022-05-19 17:47:45 -05:00
Dean Sheather cabc164f74
feat: use and display default template values when creating wkspc. (#1584) 2022-05-19 22:49:40 +10:00
Kyle Carberry c2b5009208
fix: Unnest workspaces command to the top-level (#1241)
This changes all "coder workspace *" commands to root.
A few of these were already at the root, like SSH. The
inconsistency made for a confusing experience.
2022-05-02 11:08:52 -05:00
Renamed from cli/workspacecreate_test.go (Browse further)