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
87fe16cde9
feat(cli): add --id parameter to templates init command ( #7116 )
...
This PR makes the following changes:
- Adds an --id parameter to coder templates init so that you can non-interactively initialize a specific example template by ID (e.g. folder name)
- Updates develop.sh and lima/coder.yaml to use this parameter to select the docker example template.
2023-04-13 15:02:49 +01:00
a44070e2ec
feat(scaletest): allow scaletests to run using the host credentials ( #7075 )
2023-04-11 19:49:28 +00:00
2585249014
chore: Move writeConfig to a cli middleware ( #7093 )
...
* chore: Move writeConfig to a cli middleware
Trying to reduce the server LoC, it's very long and unwieldy.
The workspace proxy code needs to replicate, and trying to reuse
as much as possible
* Move deprecation warnings too
2023-04-11 14:47:07 -05:00
4dd5d79412
fix: Parse CODER_GITAUTH_N_NO_REFRESH
env var value instead of key ( #7051 )
2023-04-11 09:18:17 -05:00
9d39371ee0
feat: Option to remove WorkspaceExec from owner
role ( #7050 )
...
* chore: Add AllResources option for listing all RBAC objects
* Owners cannot do workspace exec site wide
* Fix FE authchecks to valid RBAC resources
2023-04-11 08:57:23 -05:00
4b99e2d07e
feat: add YAML support to server ( #6934 )
2023-04-07 22:58:21 +00:00
3e250c6609
chore: clidocgen: generate consistent docs ( #7047 )
...
* chore: clidocgen: ensure same generated docs
* fix
2023-04-07 18:32:06 +02:00
0347231bb8
feat: expose agent metrics via Prometheus endpoint ( #7011 )
...
* WIP
* WIP
* WIP
* Agents
* fix
* 1min
* fix
* WIP
* Test
* docs
* fmt
* Add timer to measure the metrics collection
* Use CachedGaugeVec
* Unit tests
* Address PR comments
2023-04-07 17:48:52 +02:00
c68ab7d9a8
fix: support X-Forwarded-Host
with CODER_REDIRECT_TO_ACCESS_URL
( #7035 )
...
Fixes #7026 .
2023-04-06 12:07:24 -05:00
0224426e5b
refactor(agent): Move SSH server into agentssh package ( #7004 )
...
Refs: #6177
2023-04-06 19:39:22 +03:00
3ff2ae1b1a
fix: output askpass to stderr ( #7034 )
...
This fixes askpass not outputting a prompt.
2023-04-06 11:32:43 -05:00
63f9ef2480
chore: fix minor int coercion codeql vulnerability ( #7024 )
2023-04-05 21:43:24 +00:00
eb66cc9f35
chore: move app proxying code to workspaceapps pkg ( #6998 )
...
* chore: move app proxying code to workspaceapps pkg
Moves path-app, subdomain-app and reconnecting PTY proxying to the new
workspaceapps.WorkspaceAppServer struct. This is in preparation for
external workspace proxies.
Updates app logout flow to avoid redirecting to coder-logout.${app_host}
on logout. Instead, all subdomain app tokens owned by the logging-out
user will be deleted every time you logout for simplicity sake.
Tests will remain in their original package, pending being moved to an
apptest package (or similar).
Co-authored-by: Steven Masley <stevenmasley@coder.com >
2023-04-05 13:41:55 -05:00
00d468b964
feat(cli): add --output={text,json} to version cmd ( #7010 )
...
* feat(cliui): add TextFormat
* feat(cli): add --format={text,json} to version cmd
2023-04-05 13:16:05 +01:00
9c4ccd76a0
fix(coderd)!: add CODER_OIDC_IGNORE_USERINFO configuration option ( #6922 )
...
* add CODER_OIDC_IGNORE_USERINFO option
* chore: update docs for CODER_OIDC_IGNORE_USERINFO w.r.t ADFS
* fix!: codersdk: fix incorrectly named OIDC_GROUP_MAPPING -> CODER_OIDC_GROUP_MAPPING
2023-04-05 09:07:43 +01:00
385a4262e2
fix: remove audit-logging flag from the server ( #6991 )
...
Co-authored-by: Colin Adler <colin1adler@gmail.com >
2023-04-04 12:11:10 -05:00
e33941b7c2
feat: allow disabling autostart and custom autostop for template ( #6933 )
...
API only, frontend in upcoming PR.
2023-04-04 12:48:35 +00:00
083fc89f93
feat: accept immutable parameters when used first time ( #7000 )
...
* Backend fixes
* CLI: adjust update flow
2023-04-04 14:22:46 +02:00
bc18f6c113
fix: add CODER_AGENT_TAILNET_LISTEN_PORT
for specifying a static tailnet port ( #6980 )
...
Fixes #5175 .
2023-04-03 16:20:19 +00:00
4ee01dc95c
fix: remove orphan rbac warning message ( #6979 )
...
The request will fail if the user doesn't have permissions, so it seems
useless to output this.
2023-04-03 11:15:56 -05:00