Commit Graph

173 Commits

Author SHA1 Message Date
Steven Masley 09f00c08df
chore: shutdown provisioner should stop waiting on client (#13118)
* chore: shutdown provisioner should stop waiting on client
* chore: add unit test that replicates failed client conn
2024-05-03 10:15:17 -05:00
Kayla Washburn-Love 74f27719b8
feat: specify a custom "terms of service" link (#13068) 2024-04-25 16:36:51 -06:00
Kyle Carberry 03ab37b343
chore: remove middleware to request version and entitlement warnings (#12750)
This cleans up `root.go` a bit, adds tests for middleware HTTP transport
functions, and removes two HTTP requests we always always performed previously
when executing *any* client command.

It should improve CLI performance (especially for users with higher latency).
2024-03-25 15:01:42 -04:00
Colin Adler 37a05372fa
fix: disable relay if built-in DERP is disabled (#12654)
Fixes https://github.com/coder/coder/issues/12493
2024-03-21 16:53:41 -05:00
Cian Johnston 5454f4997b
chore(ci): clean up databases after test finishes in CI (#12702) 2024-03-21 14:53:16 +00:00
Garrett Delfosse 4d9fe05f5a
feat: add awsiamrds db auth driver (#12566) 2024-03-20 13:14:43 -04:00
Steven Masley d789a60d47
chore: remove max_ttl from templates (#12644)
* chore: remove max_ttl from templates

Completely removing max_ttl as a feature on template scheduling. Must use other template scheduling features to achieve autostop.
2024-03-20 10:37:57 -05:00
Marcin Tojek 0e8ebb9b22
fix: fix flaky TestWorkspaceProxy_Server_PrometheusEnabled (#12645) 2024-03-18 16:43:41 +01:00
Ammar Bandukwala e5cc17af92
chore(cli): hide --organization (#12626)
It's potentially confusing to users since we aren't fleshing out organizations right now.
2024-03-18 09:09:26 -05:00
Ammar Bandukwala b4c0fa80d8
chore(cli): rename Cmd to Command (#12616)
I think Command is cleaner and my original decision to use "Cmd"
a mistake.

Plus this creates better parity with cobra.
2024-03-17 09:45:26 -05:00
Ammar Bandukwala 496232446d
chore(cli): replace clibase with external `coder/serpent` (#12252) 2024-03-15 11:24:38 -05:00
Kyle Carberry 895df54051
fix: separate signals for passive, active, and forced shutdown (#12358)
* fix: separate signals for passive, active, and forced shutdown

`SIGTERM`: Passive shutdown stopping provisioner daemons from accepting new
jobs but waiting for existing jobs to successfully complete.

`SIGINT` (old existing behavior): Notify provisioner daemons to cancel in-flight jobs, wait 5s for jobs to be exited, then force quit.

`SIGKILL`: Untouched from before, will force-quit.

* Revert dramatic signal changes

* Rename

* Fix shutdown behavior for provisioner daemons

* Add test for graceful shutdown
2024-03-15 13:16:36 +00:00
Danny Kopping 7a7105ad66
feat: make agent stats' cardinality configurable (#12535) 2024-03-13 12:03:36 +02:00
Cian Johnston 8f40ee3465
Revert "feat: make agent stats' cardinality configurable (#12468)" (#12533)
This reverts commit 21d1873d97.
2024-03-11 14:33:36 +00:00
Danny Kopping 21d1873d97
feat: make agent stats' cardinality configurable (#12468)
Closes #12221
2024-03-11 16:04:08 +02:00
Dean Sheather d2a5b31b2b
feat: add derp mesh health checking in workspace proxies (#12222) 2024-03-08 16:31:40 +10:00
Colin Adler 6b0b87eb27
fix: add `--block-direct-connections` to wsproxies (#12182) 2024-03-07 23:45:59 -06:00
Mathias Fredriksson 4ce1448bbe
fix(cli): generate correctly named file in DumpHandler (#12409) 2024-03-04 18:35:33 +02:00
Cian Johnston eba8cd7c07
chore: consolidate various randomPort() implementations (#12362)
Consolidates our existing randomPort() implementations to package testutil
2024-02-29 12:51:44 +00:00
Cian Johnston 2bf3c72948
chore: add test for enterprise server cli (#12353) 2024-02-29 10:25:50 +00:00
Marcin Tojek 30d9d84758
fix: use flag to enable Prometheus (#12345) 2024-02-28 17:58:03 +01:00
Dean Sheather bedd2c5922
fix: avoid race between replicas on start (#12344)
DERP mesh key setup would do a SELECT and then an INSERT on failure, without a lock. During some testing with multiple replicas, I managed to cause a replica to crash due to them initializing simultaneously.

Fixes:

Encountered an error running "coder server"
create coder API: insert mesh key: pq: duplicate key value violates unique constraint "site_configs_key_key"

Co-authored-by: Cian Johnston <cian@coder.com>
2024-02-28 16:14:11 +00:00
Marcin Tojek eb4a1e2568
feat: enable Prometheus endpoint for external provisioner (#12320) 2024-02-28 09:21:56 +01:00
Steven Masley 748cf4b2c4
feat: implement global flag for org selection (#12276)
* feat: implement global flag for org selection

Any command can use '-z' to override org context
2024-02-26 11:38:49 -06:00
Steven Masley d2998c6b7b
feat: implement organization context in the cli (#12259)
* feat: implement organization context in the cli

`coder org show current`
2024-02-26 10:03:49 -06:00
Cian Johnston 53e8f9c0f9
fix(coderd): only allow untagged provisioners to pick up untagged jobs (#12269)
Alternative solution to #6442

Modifies the behaviour of AcquireProvisionerJob and adds a special case for 'un-tagged' jobs such that they can only be picked up by 'un-tagged' provisioners.

Also adds comprehensive test coverage for AcquireJob given various combinations of tags.
2024-02-22 15:04:31 +00:00
Kayla Washburn-Love 475c3650ca
feat: add support for optional external auth providers (#12021) 2024-02-21 11:18:38 -07:00
Steven Masley 2dac34276a
fix: add postgres triggers to remove deleted users from user_links (#12117)
* chore: add database test fixture to insert non-unique linked_ids
* chore: create unit test to exercise failed email change bug
* fix: add postgres triggers to keep user_links clear of deleted users
* Add migrations to prevent deleted users with links
* Force soft delete of users, do not allow un-delete
2024-02-20 13:19:38 -06:00
Cian Johnston 643c3ee54b
refactor(provisionerd): move provisionersdk.VersionCurrent -> provisionerdproto.VersionCurrent (#12225) 2024-02-20 12:44:19 +00:00
Marcin Tojek ad8e0db172
feat: add custom error message on signups disabled page (#11959) 2024-02-01 18:01:25 +01:00
Jon Ayers 0c30dde9b5
feat: add customizable upgrade message on client/server version mismatch (#11587) 2024-01-30 17:11:37 -06:00
Cian Johnston fdf9f03097
fix(enterprise/cli): add ID to default columns in licenses list output (#11823) 2024-01-26 09:55:16 +00:00
Marcin Tojek 77a4792ecd
fix(cli): ssh: auto-update workspace (#11773) 2024-01-23 18:01:44 +01:00
Marcin Tojek 89fd29478d
feat: expose support links as env variables (#11697) 2024-01-19 11:20:36 +01:00
Steven Masley b246f08d84
chore: move app URL parsing to its own package (#11651)
* chore: move app url parsing to it's own package
2024-01-17 10:41:42 -06:00
Jon Ayers 1196f83ebd
feat: automatically activate dormant workspaces when manually started (#11655) 2024-01-16 16:42:04 -06:00
Jon Ayers aecdafdcf2
fix: fix template edit overriding with flag defaults (#11564) 2024-01-11 16:18:46 -06:00
Jon Ayers 9b437032e9
feat: remove workspace_actions experiment (#11427) 2024-01-10 16:19:39 -06:00
Cian Johnston 04fd96a014
feat(coderd): add provisioner_daemons to /debug/health endpoint (#11393)
Adds a healthcheck for provisioner daemons to /debug/health endpoint.
2024-01-08 09:29:04 +00:00
Cian Johnston 1ef96022b0
feat(coderd): add provisioner build version and api_version on serve (#11369)
* assert provisioner daemon version and api_version in unit tests
* add build info in HTTP header, extract codersdk.BuildVersionHeader
* add api_version to codersdk.ProvisionerDaemon
* testutil.MustString -> testutil.MustRandString
2024-01-03 09:01:57 +00:00
Jon Ayers 0b7d68dc3f
chore: remove template_update_policies experiment (#11250) 2023-12-21 13:39:33 -06:00
Spike Curtis 52b87a28b0
fix: stop printing warnings on external provisioner daemon command (#11309)
fixes #11307
2023-12-21 16:55:34 +04:00
Steven Masley fbda21a9f2
feat: move moons experiment to ga (released) (#11285)
* feat: release moons experiment as ga
2023-12-19 14:40:22 -06:00
Cian Johnston d2d7628522
fix(enterprise/cli): add CODER_PROVISIONER_DAEMON_LOG_* options (#11279)
- Extracts cli.BuildLogger to clilog package
- Updates existing usage of cli.BuildLogger and removes it
- Use clilog to initialize provisionerd logger
2023-12-19 16:49:50 +00:00
Cian Johnston 213b768785
feat(coderd): insert provisioner daemons (#11207)
* Adds UpdateProvisionerDaemonLastSeenAt
* Adds heartbeat to provisioner daemons
* Inserts provisioner daemons to database upon start
* Ensures TagOwner is an empty string and not nil
* Adds COALESCE() in idx_provisioner_daemons_name_owner_key
2023-12-18 16:44:52 +00:00
Garrett Delfosse 7924bb2a56
feat!: move workspace renames behind flag, disable by default (#11189) 2023-12-15 13:38:47 -05:00
Dean Sheather 1e49190e12
feat: add server flag to disable user custom quiet hours (#11124) 2023-12-15 19:33:51 +10:00
Spike Curtis 9a4e1100fa
chore: move drpc transport tools to codersdk/drpc (#11224)
Part of #10532

DRPC transport over yamux and in-mem pipes was previously only used on the provisioner APIs, but now will also be used in tailnet.  Moved to subpackage of codersdk to avoid import loops.
2023-12-15 12:41:39 +04:00
Dean Sheather b36071c6bb
feat: allow templates to specify max_ttl or autostop_requirement (#10920) 2023-12-15 18:27:56 +10:00
Steven Masley 78517cab52
feat: add group allowlist for oidc (#11070)
* feat: group allow list in OIDC settings
2023-12-08 10:14:19 -06:00