Commit Graph

777 Commits

Author SHA1 Message Date
b1d1b63113 chore: ensure logs consistency across Coder (#8083) 2023-06-20 12:30:45 +02:00
d6f8bd7847 feat(cli): add coder stat command (#8005) 2023-06-20 11:16:57 +02:00
247f8a973f feat: replace ssh maxTimeout with keep-alive mechanism (#8062)
* Bump up coder/ssh

* feat: Set default agent timeout to ~72h

* Address PR comments

* Fix
2023-06-16 15:22:18 +02:00
6e598234b6 fix: only collect prometheus database metrics when explicitly enabled (#8045)
* fix: only collect prometheus database metrics when explicitly enabled

* add missing test

* de-duplicate wrapping
2023-06-15 12:34:16 +01:00
6c4c3d6ce5 feat: add login type 'none' to prevent password login (#8009)
* feat: add login type 'none' to prevent login

Users with this login type must use tokens to authenticate.
Tokens must come from some other source, not a /login with password
authentication
2023-06-14 12:48:43 -05:00
3619a3a6dd feat: add disabling of default 'everyone' group access to template (#7982)
* feat: add disabling of default 'everyone' group access to template
* add FE to disable everyone group
* require entitlement to uncheck box
2023-06-14 11:08:58 -05:00
e4b6f5695b chore: separate pubsub into a new package (#8017)
* chore: rename store to dbmock for consistency

* chore: remove redundant dbtype package

This wasn't necessary and forked how we do DB types.

* chore: separate pubsub into a new package

This didn't need to be in database and was bloating it.
2023-06-14 15:34:54 +00:00
2c843f4011 fix: fix --header flag in CLI (#8023) 2023-06-14 21:52:01 +10:00
df842b31e8 chore: fix miscellaneous issues in scaletest scripts (#8006)
* chore: scaletest: plumb through more options

* bump terraform version

* scaletest.sh: pprof during traffic gen

* cli/scaletest: actually wait for prometheus metrics to be scraped

* increase prometheus wait
2023-06-14 09:38:04 +01:00
9cf3c582cb test: add unit test that deletes abandoned workspace (#7990)
* test: add unit test that deletes abandoned workspace

This is to ensure we do not break this functionality in future.
This is important incase this edge case happens, an admin can
clean up the abandoned resources.
2023-06-13 10:42:18 -05:00
b70d2b1767 fix: correct the correct cli output for 'template version list --output=json' (#7984)
* fix: correct 'template version list --output=json' cli cmd
2023-06-12 14:35:51 -05:00
4bc4e63637 fix(cli/ssh): fix lint error (#7974) 2023-06-12 16:17:41 +00:00
5de1084639 feat(cli/ssh): simplify log file flags (#7863)
And, fix a race condition.
2023-06-12 09:18:33 +04:00
065206345e test: add golden files to enterprise cli (#7924)
* test: Add golden files to enterprise cli
2023-06-09 11:35:20 -05:00
a4cc883be1 chore: add proxy health interval flag/env config (#7919)
* chore: plumbing for proxy health interval from flag/env
2023-06-08 12:58:24 -05:00
03034dc508 chore(cli/configssh): add comment about wait and skip proxy (#7917) 2023-06-08 14:23:03 +00:00
fa91e11105 fix(cli/help): show deprecation notice properly for flags (#7904) 2023-06-08 14:14:42 +00:00
a1c32954d9 feat(cli/configssh): add support for wait yes/no/auto (#7893)
Refs #7768
2023-06-08 14:06:50 +00:00
94aa9be33a feat(cli/ssh): implement wait options and deprecate no-wait (#7894)
Fixes #7768
Refs #7893
2023-06-08 16:52:44 +03:00
b2324325fa chore: add warning log if misconfigured groups oidc (#7874)
* chore: add warning log if misconfigured groups oidc

This is not perfect, but if we find a 'groups' claim and it is not
configured, put out a warning log to give some information
2023-06-08 08:51:59 -05:00
4f29f9abe3 fixup! fix(cli): speed up CLI over SSH (#7885) (#7888) 2023-06-07 09:13:22 +00:00
5eaf809851 fix(cli): speed up CLI over SSH (#7885)
By caching the terminal's color profile, we avoid myriad round trips during command execution.
2023-06-07 05:22:58 +00:00
0665a6c2f2 feat: add metric for provisioner daemons (#7858) 2023-06-06 16:50:11 -05:00
660bbb8d38 refactor: deprecate login_before_ready in favor of startup_script_behavior (#7837)
Fixes #7758
2023-06-06 11:58:07 +03:00
e2613c91a7 feat(cli): support non-active template version pushes (#7488)
So that we can push template updates for testing without impacting
normal users of the template.

---------

Co-authored-by: Ammar Bandukwala <ammar@ammar.io>
Co-authored-by: Muhammad Atif Ali <matifali@live.com>
Co-authored-by: Atif Ali <atif@coder.com>
2023-06-03 22:39:00 +00:00
c6cd042e80 fix(clitest): use slogtest for logging stdin and stdout (#7828) 2023-06-02 22:38:31 +00:00
edccd2de73 fix(agent): configure logger for both reaper and agent (#7823) 2023-06-02 15:51:10 -05:00
6fdebd8a07 hotfix(agent): only retain 1 logfile at a time (#7815) 2023-06-02 12:28:38 -05:00
a7366a8b76 feat!: drop support for legacy parameters (#7663) 2023-06-02 11:16:46 +02:00
9704945428 fix: standardize on CODER_PG_CONNECTION_URL (#7781)
Fixes #7513.
2023-06-01 15:02:29 -08:00
784696dfa5 feat: add prometheus metrics to database.Store (#7713)
* Adds dbmetrics package and wraps database.Store with a Prometheus HistogramVec of timings.
* Adds Wrappers method to database.Store to avoid double-wrapping interfaces
* Fixes test flake in TestLicensesListFake
2023-05-31 14:55:57 +01:00
43eee35ae8 chore(cli): correctly report telemetry even when transport replaced (#7670)
By introducing the "ExtraHeaders" map, we can apply headers even when
handlers replace the transport, as in the case of our scaletests.

Also, only send telemetry header when it's small.
2023-05-31 00:11:56 +00:00
702c9081e0 fix: do not skip parameter validation if min or max = 0 (#7707) 2023-05-30 14:57:06 +02:00
66f5d39ff5 test(agent): Improve use of inv.Context() (#7696)
This will ensure tests timeout instead of hang indefinitely since
`inv.Context()` is assigned a timeout by default.
2023-05-26 13:48:39 +00:00
05efd64320 test: Skip tests that send os.Interrupt to test pid (#7695)
This can cause test flakes due to clitest commands running in memory and
listening to interrupt signals.
2023-05-26 16:17:09 +03:00
795050bba3 chore: add prometheus monitoring of workspace traffic generation (#7583)
- Exposes reads/writes from scaletest traffic generation (default: 0.0.0.0:21112)
- Adds self-hosted prometheus with remote_write to loadtest terraform
- Adds convenience script to run a traffic generation test
2023-05-26 13:53:35 +01:00
14efdadd3c feat: Collect agent SSH metrics (#7584) 2023-05-25 12:52:36 +02:00
6a1e7ee1d0 feat: add file logger to coder ssh (#7646)
* coder ssh can log to file

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

* Update golden file

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

* generate CLI docs

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

* Fix imports, typo

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

* log more things!

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

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-05-25 05:07:39 +00:00
dd69cc9148 fix: use different terraform cache dir (#7672) 2023-05-24 22:35:00 +00:00
5eb41e8794 feat(cli): allow specifying the listen address in coder port-forward (#7635) 2023-05-24 15:38:40 -04:00
ec117e841a chore: add CLI invokation telemetry (#7589) 2023-05-24 11:08:03 -05:00
71c52ea93c feat: Add logging options for coder agent (#7474)
Similar to logging options in the coderd server, but for the agent
running in workspaces. Meant to make hollistic log collection and
querying simpler.
2023-05-24 14:32:40 +00:00
b6c8e5be48 fix(cli/ssh): Fetch up-to-date build info to avoid ws has no agents (#7650)
Fixes #5836
2023-05-24 12:37:22 +03:00
c8ea76c7fa fix(cli): correctly use cache dir for provisionerd work dir (#7651) 2023-05-23 13:37:27 -04:00
d203f5259d fix: Port forward should ignore coder ports (#7645)
Ports opened by coder agent should be ignored in the listening ports
map.
2023-05-23 17:14:05 +02:00
cd416c86dd refactor: workspace builds (#7541)
* refactor workspace builds

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

* make gen

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

* Remove ParameterResolver from typescript

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

* rename conversion -> database/db2sdk

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

* tests for db2sdk

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

* Tests for ParameterResolver

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

* wsbuilder tests

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

* Move parameter validation tests to richparameters_test.go

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

* Fix CI generation; rename mock->dbmock

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

* Fix test imports

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

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-05-23 12:06:33 +04:00
00a2413c03 feat: add telemetry support for workspace agent subsystem (#7579) 2023-05-17 22:49:25 -05:00
6e7175b589 chore: fix lengthy tests in psql (#7545)
* chore: fix lengthy tests in psql

This was adding at a minimum 3mins to our psql tests!

* fix: automatically cancel tests on cleanup
2023-05-17 11:26:53 -05:00
97b4743a47 Revert "fix: set default sshMaxTimeout to 60s (#7532)" (#7544)
This reverts commit 049e557675.
2023-05-16 15:28:15 +02:00
0b156420de Make coder dotfiles symlinking idempotent (#7525)
Signed-off-by: Spike Curtis <spike@coder.com>
2023-05-15 21:00:50 +04:00