Mathias Fredriksson
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
Marc
fff2b1dc90
fix(cli): Fix postgres TDE failing version check ( #7203 )
2023-04-19 11:59:56 -05:00
Ammar Bandukwala
2b9d12828a
cli: add --debug-http flag ( #7192 )
...
This makes it easier to help debug client issues.
2023-04-19 11:07:53 -05:00
Marcin Tojek
f94ac55f02
feat(agent): Expose magicsock metrics ( #7183 )
...
* feat: Expose magicsock metrics
* golden-files
2023-04-19 09:09:23 +02:00
Kyle Carberry
693e5d94bc
fix: add global headers to vscodessh command ( #7181 )
2023-04-18 08:07:10 -05:00
Mathias Fredriksson
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
Ammar Bandukwala
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
Mathias Fredriksson
51841e9e11
test(cli): Fix TestTemplatePush/UseWorkingDir bad use of chdir ( #7160 )
2023-04-17 17:58:25 +03:00
Marcin Tojek
c39c0dcc7c
fix: select default option value ( #7152 )
2023-04-17 12:55:28 +02:00
Kyle Carberry
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
Marcin Tojek
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
Colin Adler
085330ad96
fix(provisionerd): only heartbeat when logs aren't being flushed ( #7110 )
2023-04-13 14:02:10 -05:00
Steven Masley
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
Cian Johnston
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
Colin Adler
a44070e2ec
feat(scaletest): allow scaletests to run using the host credentials ( #7075 )
2023-04-11 19:49:28 +00:00
Steven Masley
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
Kevin Conley
4dd5d79412
fix: Parse CODER_GITAUTH_N_NO_REFRESH env var value instead of key ( #7051 )
2023-04-11 09:18:17 -05:00
Steven Masley
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
Ammar Bandukwala
4b99e2d07e
feat: add YAML support to server ( #6934 )
2023-04-07 22:58:21 +00:00
Marcin Tojek
3e250c6609
chore: clidocgen: generate consistent docs ( #7047 )
...
* chore: clidocgen: ensure same generated docs
* fix
2023-04-07 18:32:06 +02:00
Marcin Tojek
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
Kyle Carberry
c68ab7d9a8
fix: support X-Forwarded-Host with CODER_REDIRECT_TO_ACCESS_URL ( #7035 )
...
Fixes #7026 .
2023-04-06 12:07:24 -05:00
Mathias Fredriksson
0224426e5b
refactor(agent): Move SSH server into agentssh package ( #7004 )
...
Refs: #6177
2023-04-06 19:39:22 +03:00
Kyle Carberry
3ff2ae1b1a
fix: output askpass to stderr ( #7034 )
...
This fixes askpass not outputting a prompt.
2023-04-06 11:32:43 -05:00
Dean Sheather
63f9ef2480
chore: fix minor int coercion codeql vulnerability ( #7024 )
2023-04-05 21:43:24 +00:00
Dean Sheather
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
Cian Johnston
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
Cian Johnston
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
Kyle Carberry
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
Dean Sheather
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
Marcin Tojek
083fc89f93
feat: accept immutable parameters when used first time ( #7000 )
...
* Backend fixes
* CLI: adjust update flow
2023-04-04 14:22:46 +02:00
Kyle Carberry
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
Kyle Carberry
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
Marcin Tojek
633dfbdb2e
feat: rich parameters: introduce display_name ( #6919 )
...
* model
* DB
* fix: DisplayName
* proto
* Proto
* Update go dep
* fixme
* fix format
* config
* fmt
* fix
* Fix
* fix
* chore(UI): redirecting from workspace page if 404 (#6880 )
* model
* CLI: Display parameter
* fix
* update dep
* fix
* fix
* fix
* UI changes
* fmt
---------
Co-authored-by: Kira Pilot <kira@coder.com >
2023-04-03 14:37:47 +02:00
Ammar Bandukwala
c191692751
chore(cli): send help to stdout ( #6865 )
...
Minimizes pesky `2>&1` when working with help.
2023-03-31 18:51:55 +00:00
Ammar Bandukwala
c2a96bdc7c
fix: compilation failure with (*OptionSet).SetDefaults
...
This slipped through CI due to a merge race.
2023-03-31 18:02:55 +00:00
Ammar Bandukwala
599699b3a9
fix: truly allow overridding default string array ( #6874 )
2023-03-31 12:12:03 -05:00
Cian Johnston
96ff400587
chore(clibase): add some more tests for parsing options from env ( #6930 )
2023-03-31 17:21:56 +01:00
Kyle Carberry
5686fc9983
chore: skip chdir template push test on windows ( #6890 )
...
See https://github.com/coder/coder/actions/runs/4565958214/jobs/8057842941
2023-03-30 10:21:13 -05:00
Kyle Carberry
401b9276ae
chore: clone styles to prevent race ( #6888 )
...
See https://github.com/coder/coder/actions/runs/4565541977/jobs/8056830691?pr=6885
2023-03-30 10:18:24 -05:00
Kyle Carberry
1f600fc526
chore: use defer instead of t.Cleanup for chdir ( #6887 )
...
This _might_ resolve the races in `TestTemplatePush`.
2023-03-30 09:48:03 -05:00
Cian Johnston
563c3ade06
feat: allow configuring OIDC email claim and OIDC auth url parameters ( #6867 )
...
This commit:
- Allows configuring the OIDC claim Coder uses for email addresses (by default, this is still email)
- Allows customising the parameters sent to the upstream identity provider when requesting a token. This is still access_type=offline by default.
- Updates documentation related to the above.
2023-03-30 09:36:57 +01:00
Ammar Bandukwala
6981f89cd8
Revert "fix: allow overridding default string array ( #6873 )"
...
This reverts commit 58d650c2bb .
2023-03-29 20:24:07 -05:00
Ammar Bandukwala
58d650c2bb
fix: allow overridding default string array ( #6873 )
...
* fix: allow overridding default string array
* Cleanup code
* fixup! Cleanup code
* fixup! Cleanup code
* fixup! Cleanup code
* fixup! Cleanup code
2023-03-30 01:09:20 +00:00
Steven Masley
90da09bc2c
chore: Make deployment admin page show better durations ( #6856 )
...
* chore: Make deployment admin page show better durations
Also fix group mappings
2023-03-29 16:26:20 -05:00
Colin Adler
872037bf85
feat: allow http2 in coder server ( #6871 )
2023-03-29 14:45:57 -05:00
Steven Masley
a8346bd8ea
feat: Allow unsetting ssh config options from deployment ( #6847 )
...
This allows deleting ssh config options
2023-03-28 11:06:42 -05:00
Ammar Bandukwala
1176256a44
feat: improve CLI error messages ( #6778 )
2023-03-28 16:03:34 +00:00
Ammar Bandukwala
164528176a
fix(clibase): allow empty values to unset defaults ( #6832 )
2023-03-28 01:58:06 +00:00
Ammar Bandukwala
773580c7c9
fix: correct minor formatting issues in CLI ( #6813 )
...
* fix: remove excess newlines from server startup
* Don't log benign closed pipe errors
2023-03-28 01:01:25 +00:00