Commit Graph

1131 Commits

Author SHA1 Message Date
b4057bd74a feat: make pgCoordinator generally available (#8419)
* pgCoord to GA, fix tests

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

* Fix generation and coordinator delete RBAC

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

* Fix fakeQuerier -> FakeQuerier

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

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-07-12 13:35:29 +04:00
dd4aafb350 feat: add template info tags to coderd_agents_up metric (#7942)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
2023-07-11 12:39:14 -05:00
398e8fdf89 fix(coderd/httpmw): handle oauth config removed for existing auth (#8420)
This commit fixes an edge case tied to unexpired oauth logins where the
oauth provider is removed, the server restarted, and the users auth
expiring after the fact.

Refs #8351, #8352, #8390
2023-07-11 20:29:29 +03:00
f67ccc9bc0 feat: add resource_target to audit log search (#8423)
* feat: add resource_target to audit log search
2023-07-11 13:05:21 -04:00
bc102d6bd7 feat: add cli first class validation (#8374)
* feat: add cli first class validation
* feat: add required flag to cli options
* Add unit test to catch invalid and missing flag
2023-07-11 09:59:55 -04:00
3f6a158016 chore: enable exhaustruct linter (#8403)
* chore: enable exhaustruct linter

* add exlusion rules

* move to allowlist instead

* exhaustruct httpmw package

* fixup! exhaustruct httpmw package

* make lint

* address PR comments
2023-07-11 14:30:33 +01:00
75f62dc39d feat: add support for template version messages in api and cli (#8336) 2023-07-11 13:11:08 +03:00
b4a7fe3221 fix: use expires_in field for git device refresh (#8411)
This was causing git auth to never refresh after the token
became expired after 8hrs.
2023-07-11 09:28:52 +00:00
d896b74fa2 feat(site): display build logs on workspace transitioning statuses (#8397) 2023-07-10 17:47:39 -03:00
ef836de330 fix: document workspace filter query param correctly (#8408) 2023-07-10 18:57:09 +00:00
2ee406d7b6 feat: log out and redirect user when converting to oidc (#8347)
* feat: log out user on conver to oidc

Log out user and redirect to login page and log out user when
they convert to oidc.
2023-07-10 10:25:41 -04:00
90a3debe3f fix(coderd): pass oauth configs to site (#8390) 2023-07-10 17:23:41 +03:00
9f2a931eb8 feat(coderd): support ephemeral parameters (#8367) 2023-07-10 13:44:03 +02:00
b73f9d8e86 feat: add computed workspace and agent health fields to the api (#8280) 2023-07-10 12:40:11 +03:00
a297a014d6 chore: improve error message for incorrect login type (#8349)
* chore: add better error in wrong login type
2023-07-07 11:33:31 -04:00
396e5e9a60 chore(database): fix test flake in TestUserLastSeenFilter (#8369) 2023-07-07 14:28:45 +01:00
e088303382 feat!: drop LegacyVariableName from coder parameter (#8360) 2023-07-07 14:14:29 +02:00
9a0ba1bdc3 fix(coderd): remove CREATE INDEX CONCURRENTLY from migrations (#8353) 2023-07-06 16:44:29 -05:00
2ebd0ec6c5 fix: resolve nil pointer dereference on missing oauth config (#8352) 2023-07-06 16:46:22 -04:00
7fcf319e01 fix(cli)!: protect client Logger and refactor cli scaletest tests (#8317)
- (breaking) Protects Logger and LogBodies fields of codersdk.Client with its mutex. This addresses a data race in cli/scaletest.
- Fillets the existing cli/createworkspaces unit test and moves the testing logic there into the tests under scaletest/createworkspaces.
- Adds testutil.RaceEnabled bool const and conditionaly skips previously-skipped tests under scaletest/ if the race detector is enabled. This is unfortunate and sad, but I would prefer to have these tests at least running without the race detector than not running at all.
- Adds IgnoreErrors option to fake in-memory agent loggers; having the agents fail the test immediately when they encounter any sort of error isn't really helpful.
2023-07-06 09:43:39 +01:00
418c9b8743 docs: update template acl example params (#8320)
Param examples were unhelpful
2023-07-05 17:24:21 +00:00
4a9c8f407a feat: add auto-locking/deleting workspace based on template config (#8240) 2023-07-02 21:29:52 -05:00
6015319e9d feat: show service banner in SSH/TTY sessions (#8186)
* Allow workspace agents to get appearance
* Poll for service banner every two minutes
* Show service banner before MOTD if not quiet
2023-06-30 10:41:29 -08:00
f0bd258ff1 feat: move proxy settings page to deployment options (#8246)
* feat: Move workspace proxy page to deployment options

Workspace proxy settings page is now an admin feature

* WorkspaceProxy response extends region
2023-06-30 11:32:35 -04:00
9f76dab348 chore: Bump migration to remove conflict (#8273) 2023-06-30 13:12:40 +00:00
b5f26d9bdf feat: add ability for users to convert their password login type to oauth/github login (#8105)
* Currently toggled by experiment flag

---------

Co-authored-by: Bruno Quaresma <bruno@coder.com>
2023-06-30 08:38:48 -04:00
6639c69fad feat: add "display_order" column to coder_parameter to keep parameters sorted in UI (#8227) 2023-06-30 12:41:55 +02:00
34467a3289 feat: add github device flow for authentication (#8232)
* feat: add github device flow for authentication

This will allow us to add a GitHub OAuth provider out-of-the-box
to reduce setup requirements.

* Improve askpass view

* Add routes to improve clarity of git auth

* Redesign the git auth page

* Refactor to add a page view

* Fix sideways layout

* Remove legacy notify

* Fix git auth redirects

* Add E2E tests

* Fix route documentation

* Fix imports

* Remove unused imports

* Fix E2E web test

* Fix friendly message appearance

* Fix layout shifting for full-screen sign-in

* Fix height going to 100%

* Fix comments
2023-06-29 18:58:01 +00:00
83fee4b192 feat: enable Terraform debug mode via deployment configuration (#8260) 2023-06-29 15:22:21 +02:00
749307ef08 feat: provide endpoint to lock/unlock workspace (#8239) 2023-06-28 16:12:49 -05:00
d3c39b60c9 feat: add agent log streaming and follow provisioner format (#8170) 2023-06-28 10:54:13 +02:00
b8a143566b fix: use *string instead of error in healthcheck response (#8234) 2023-06-27 19:13:54 +00:00
98a5ae7f48 feat: add provisioner job hang detector (#7927) 2023-06-25 13:17:00 +00:00
ba9d038d42 feat: add periodic cleanup of PG Coordinator state (#8142)
* PG Coordinator cleans orphaned state

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

* Don't need pubsub

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

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-06-23 13:23:28 +04:00
f56db1b41b feat: add user search query param on last_seen (#8139)
* feat: add sql filter for before/after on last_seen column
2023-06-22 15:24:48 -05:00
8e2422d42c feat: use named loggers in coderd (#8148) 2023-06-22 20:09:33 +02:00
e856491476 feat: enable PG Coordinator as experiment (#8144)
Signed-off-by: Spike Curtis <spike@coder.com>
2023-06-22 13:12:29 +04:00
1b0124ecdb feat: automatically stop workspaces based on failure_ttl (#7989) 2023-06-22 00:33:22 -04:00
d434181941 feat: add cohesive e2e tests for the web terminal, apps, and workspaces (#8140)
* feat: add cohesive e2e tests for the web terminal, apps, and workspaces

* Fix web terminal flake
2023-06-22 00:21:40 +00:00
2a492b7008 chore: improve the setup experience with various fixes (#8130)
* Move updatecheck logs to debug mode

This was causing logs to be emitted immediately after
initial setup, which seemed odd for the user.

* Fix setup page text to say "Create" instead of "Setup" account

* Improve copy on the empty workspaces page

- This view can be seen after the user creates their first workspace, so saying first is bad.
- It should describe what a workspace is, so I modified the description.
- The create from template button wasn't helpful!

* Improve the copy for the empty templates view

- This didn't describe what a template actually is.
- The title had the same problem as workspaces, where first makes no sense.

* Improve text consistency on the Create Template page

* Fix "View activity" displaying for non-Enterprise users

This was causing an exception to be thrown.

* Improve messaging of empty groups view

* Appropriately capitalize Workspace and Template

* Improve Docker template taglines

* Fix types
2023-06-21 18:23:59 -05:00
a28d422c35 feat: add flag to disable all direct connections (#7936) 2023-06-21 22:02:05 +00:00
96f9e61ca1 Strip CORS headers from applications (#8057)
The problem is that the headers get doubled up (not overwritten) and
browsers do not like multiple values for the allowed origin even though
it appears the spec allows for it.

We could prefer the application's headers instead of ours but since we
control OPTIONS I think preferring ours will by the more consistent
experience and also aligns with the original RFC.
2023-06-21 13:41:27 -08:00
bc739bdfce feat(cli): add hidden netcheck command (#8136) 2023-06-21 14:33:19 -05:00
bce8a983fe chore(site): remove new filter from experimental (#8112) 2023-06-21 10:20:37 -03:00
cc17d2feea refactor: add postgres tailnet coordinator (#8044)
* postgres tailnet coordinator

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

* Fix db migration; tests

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

* Add fixture, regenerate

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

* Fix fixtures

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

* review comments, run clean gen

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

* Rename waitForConn -> cleanupConn

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

* code review updates

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

* db migration order

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

* fix log field name last_heartbeat

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

* fix heartbeat_from log field

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

* fix slog fields for linting

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

---------

Signed-off-by: Spike Curtis <spike@coder.com>
2023-06-21 16:20:58 +04:00
4fb4c9b270 chore: add more rules to ensure logs consistency (#8104) 2023-06-21 12:00:38 +02:00
69f911dfd5 feat: add queue_position and queue_size to provisioner jobs (#8074) 2023-06-20 15:07:18 -05:00
bbb0fab1de chore: merge database gen scripts (#8073)
* chore: merge database gen scripts

* Fix type params gen

* Merge enum into dbgen
2023-06-20 16:24:33 +00:00
823127e761 feat: add healthcheck database section (#8060) 2023-06-20 15:13:22 +00:00
b8ba287128 fix: disable websocket compression for startup logs in Safari (#8087) 2023-06-20 16:29:32 +03:00