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
049e557675
fix: set default sshMaxTimeout to 60s ( #7532 )
...
* fix: set default sshMaxTimeout to 60s
* fix
2023-05-15 10:40:19 -05:00
f05f12231d
feat: update slog to use logfmt ( #7477 )
2023-05-14 20:23:13 +00:00
640fcf450c
chore: improve terraform install performance ( #7478 )
2023-05-11 19:30:51 +00:00
ae3473dc1b
feat: add deleted_at field to workspace model ( #7475 )
...
* added impending_deletion workspace field
* gen docs
* update golden files
* added test
* PR comments
2023-05-11 08:47:53 -07:00
a42a36a474
feat: add workspace actions cleanup configuration flags to CLI template create and edit ( #7453 )
...
* added cleanup flags on template create
* added cleanup flags on template edit
* fixed tests
* added to tests
2023-05-10 12:57:11 -07:00
08fb9a6f1b
feat(cli): add trafficgen command for load testing ( #7307 )
...
This PR adds a scaletest workspace-traffic command for load testing. This opens a
ReconnectingPTY connection to each scaletest workspace (via coderd) and
concurrently writes and reads random data to/from the PTY. Payloads are of the
form #${RANDOM_ALPHANUMERIC_STRING}, which essentially drops garbage
comments in the remote shell, and should not result in any commands being executed.
2023-05-05 10:34:58 +01:00
8bd9f9c351
feat: unified tracing between coderd<->provisionerd ( #7370 )
2023-05-03 23:02:35 +00:00
9c030a8888
fix: pty.Start respects context on Windows too ( #7373 )
...
* fix: pty.Start respects context on Windows too
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix windows imports; rename ToExec -> AsExec
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix import in windows test
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-03 11:43:05 +04:00
75ad72de56
fix(server): prevent otel tracer provider from immediately being closed ( #7369 )
2023-05-02 12:06:58 -05:00
c00f5e499a
fix(server): retry initial connection to postgres ( #7325 )
2023-04-28 13:51:31 -05:00
bb0a38b161
feat: Implement aggregator for agent metrics ( #7259 )
2023-04-27 12:34:00 +02:00
3eb7f06bf1
feat(agent): add http debug routes for magicsock ( #7287 )
2023-04-26 13:01:49 -05:00
f9da2631e9
test(cli): Fix portforward test timeouts ( #7241 )
2023-04-21 11:40:31 -05:00
ac3c530283
fix(cli/clitest): race between Start
/StartWithWaiter
cleanup order ( #7232 )
2023-04-20 23:41:56 +00:00
34c6ad671c
fix(clitest): use separate channel when waiting for exit ( #7231 )
2023-04-20 14:37:44 -05:00
e2a7448cc8
fix: allow update of empty template description ( #7225 )
2023-04-20 10:59:57 -07:00
a5a5c4d400
chore: Add workspace proxy enterprise cli commands ( #7176 )
...
* feat: Add workspace proxy enterprise cli commands
* chore: Handle custom workspace proxy options. Remove excess
* chore: Add endpoint to register workspace proxies
2023-04-20 09:48:47 -05:00
c2871e12aa
fix(cli/ssh): Avoid connection hang when workspace is stopped ( #7201 )
...
* fix(cli/ssh): Avoid connection hang when workspace is stopped
Two issues are addressed here:
1. We were not detecting disconnects due to waiting for Stdin to close
(disconnect would only propagate after entering input and failing to
write to the connection).
2. In other scenarios, where the connection drop is not detected, we now
also watch workspace status and drop the connection when a workspace
reaches the stopped state.
Fixes: https://github.com/coder/jetbrains-coder/issues/199
Refs: #6180 , #6175
2023-04-19 21:32:28 +03:00
fff2b1dc90
fix(cli): Fix postgres TDE failing version check ( #7203 )
2023-04-19 11:59:56 -05:00
2b9d12828a
cli: add --debug-http flag ( #7192 )
...
This makes it easier to help debug client issues.
2023-04-19 11:07:53 -05:00
f94ac55f02
feat(agent): Expose magicsock metrics ( #7183 )
...
* feat: Expose magicsock metrics
* golden-files
2023-04-19 09:09:23 +02:00
693e5d94bc
fix: add global headers to vscodessh
command ( #7181 )
2023-04-18 08:07:10 -05:00
bf0fed4f3f
chore: Update pion/udp and improve parallel/non-parallel tests ( #7164 )
...
* test(all): Improve and fix subtests with parallell/nonparallel parents
* chore: Update pion/udp to fix buffer close
2023-04-17 20:23:10 +03:00
c6b2861493
feat: allow disabling stun addresses via env ( #7066 )
...
* feat: allow disabling stun addresses via env
Resolves #6791
* Specify a dummy access URL so the tunnel wouldn't start
* Document
---------
Co-authored-by: Kyle Carberry <kyle@carberry.com >
2023-04-17 17:20:26 +00:00
51841e9e11
test(cli): Fix TestTemplatePush/UseWorkingDir bad use of chdir ( #7160 )
2023-04-17 17:58:25 +03:00
c39c0dcc7c
fix: select default option value ( #7152 )
2023-04-17 12:55:28 +02:00
7f12020229
fix: remove irrelevant help info from coder tokens create
( #7135 )
...
The additional text didn't help much, and made it much harder to script around.
2023-04-14 12:18:01 -05:00
942aba3a66
feat: expose agent stats via Prometheus endpoint ( #7115 )
...
* WIP
* WIP
* WIP
* Agents
* fix
* 1min
* fix
* WIP
* Test
* docs
* fmt
* Add timer to measure the metrics collection
* Use CachedGaugeVec
* Unit tests
* WIP
* WIP
* db: GetWorkspaceAgentStatsAndLabels
* fmt
* WIP
* gauges
* feat: collect
* fix
* fmt
* minor fixes
* Prometheus flag
* fix
* WIP
* fix tests
* WIP
* fix json
* Rx Tx bytes
* CloseFunc
* fix
* fix
* Fixes
* fix
* fix: IgnoreErrors
* Fix: Windows
* fix
* reflect.DeepEquals
2023-04-14 16:14:52 +02:00
085330ad96
fix(provisionerd): only heartbeat when logs aren't being flushed ( #7110 )
2023-04-13 14:02:10 -05:00
fa64c58e56
chore: Export all functions used by server cmd ( #7118 )
...
* chore: Export all functions used by server cmd
Required to make workspace proxy cmd
* Factor out httpservers and tracer
2023-04-13 09:07:19 -05:00