ab764db8c8
chore: dbgen passing nil slices to postgres is not valid ( #6714 )
2023-03-22 09:10:49 -05:00
5460ab4ba6
chore: switch to new wgtunnel via tunnelsdk ( #6489 )
2023-03-22 13:13:48 +00:00
abe1e89f80
chore: increase parallelism of TestWorkspaceQuota ( #6710 )
...
This does a lot of build operations, so having multiple provisioner
daemons is great.
We were actually approaching the ceiling here for test duration!
2023-03-21 22:44:01 +00:00
00860cf1c8
feat: add group mapping option for group sync ( #6705 )
...
* feat: add group mapping option for group sync
* fixup! feat: add group mapping option for group sync
2023-03-21 14:25:45 -05:00
7e854adbb3
fix: poll audit logs to ensure write is last ( #6708 )
2023-03-21 19:19:09 +00:00
e1c755be81
chore: remove fast metric cache interval for apps tests ( #6702 )
...
This wasn't helping CI run fast, that's for sure!
2023-03-21 18:13:34 +00:00
aaa3b31a0b
chore: add echo helper to create an agent with token ( #6576 )
...
This should reduce some LOC and duplication in tests!
2023-03-21 18:03:38 +00:00
1b35ac80f2
fix: ensure agent DisconnectedAt
is greater than or equal LastConnectedAt
( #6692 )
...
See https://github.com/coder/coder/actions/runs/4471502401/jobs/7856475920
2023-03-21 11:08:39 -05:00
2321160c62
feat: Dbauthz is now default, remove out of experimental ( #6650 )
...
* feat: dbauthz always on, out of experimental
* Add ability to do rbac checks in unit tests
* Remove AuthorizeAllEndpoints
* Remove duplicate rbac checks
2023-03-21 09:10:22 -05:00
8aae0b64d3
chore: avoid logging http.ErrAbortHandler panics ( #6686 )
2023-03-21 03:51:21 +00:00
65945aef16
chore: Return copied templates to prevent reference issues ( #6679 )
2023-03-20 13:13:21 -05:00
331a49bf75
fix: dbauthz: fix RBAC call for GetTemplateVersionVariables ( #6670 )
...
In GetTemplateVersionVariables we were effectively asking the provisionerd role to call rbac.ActionCreate on rbac.ResourceTemplate, which will never work. Updated this to be rbac.ActionRead instead.
2023-03-20 10:22:16 +00:00
c3fb1b325f
feat: add owner_oidc_access_token
to coder_workspace
data source ( #6042 )
...
See the discussion in Discord here:
https://discord.com/channels/747933592273027093/1071182088490987542/1071182088490987542
Related provider PR: coder/terraform-provider-coder#91
2023-03-17 15:25:08 -05:00
090e37fc46
feat(audit): auditing token addition and removal ( #6649 )
...
* auditing tokens
* adding diffs for token auditing
* added test
* generating docs
* auditing owner field
2023-03-17 10:41:44 -07:00
1c05b46b02
chore: add debug logs for OIDC responses ( #6641 )
2023-03-16 19:33:45 -05:00
fe247c86eb
feat: Add deployment side config-ssh options ( #6613 )
...
* feat: Allow setting deployment wide ssh config settings
* feat: config-ssh respects deployment ssh config
* The '.' is now configurable
* Move buildinfo into deployment.go
2023-03-16 13:03:37 -05:00
b693b9f599
chore: fix workspace audit log flake ( #6494 )
...
This happened because sometimes a build would be queued
and completed intermittently in CI.
See https://github.com/coder/coder/actions/runs/4358121985/jobs/7618290591
2023-03-16 12:47:54 -05:00
811a69f371
feat(site): add ability to create tokens from account tokens page ( #6608 )
...
* add token actions
* added basic token form
* removed token switch
* refined date field
* limiting lifetime days to maxTokenLifetime
* broke apart files
* added loader and error
* fixed form layout
* added some unit tests
* fixed be tests
* no authorize check
2023-03-16 08:25:08 -07:00
a7c734c60b
feat: support list(string) as coder_parameter ( #6618 )
...
* feat: support list(string) as coder_parameter
* Fix
2023-03-16 11:07:10 +01:00
f91b3acf93
fix: group routine workspace agent stats by id ( #6601 )
...
Before this was creating separate rows for distinct stat entries, which
resulted in significantly more data being sent to telemetry.
2023-03-14 10:52:03 -05:00
17bc5794d4
fix: direct embedded derp traffic directly to the server ( #6595 )
...
Prior to this change, DERP traffic would route from `coderd` to the
`CODER_ACCESS_URL` to reach the internal DERP server, which may have
resulted in slower connections due to proxying, or the failure of
web traffic entirely.
If your Coder deployment has a proxy in front of it, your traffic through
web terminals, apps, and port-forwarding is about to get a lot faster!
2023-03-14 14:46:47 +00:00
348530000f
fix(coderd): Ensure agent disconnect happens after timeout ( #6600 )
...
Fixes #6598
2023-03-14 13:14:47 +00:00
7587850a1c
feat: import value from legacy variable to build parameter ( #6556 )
2023-03-14 12:02:44 +00:00
35df1b10d0
feat: add workspace agent stat reporting to telemetry ( #6577 )
...
This aggregates stats periodically and sends them by agent ID to
our telemetry server. It should help us identify which editors are
primarily in use.
2023-03-13 14:16:54 -05:00
179d9e0d24
fix(coderd): Detect agent disconnect via inactivity ( #6528 )
...
Fixes #5901
2023-03-13 11:54:53 +02:00
144f374f60
refactor(dbauthz): add authz for system-level functions ( #6513 )
...
- Introduces rbac.ResourceSystem
- Grants system.* to system and provisionerd rbac subjects
- Updates dbauthz system queries where applicable
- coderd: Avoid index out of bounds in api.workspaceBuilds
- dbauthz: move GetUsersByIDs out of system, modify RBAC check to ResourceUser
- workspaceapps: Add test case for when owner of app is not found
2023-03-10 18:09:28 +00:00
7eb2c2ff6d
Revert "chore: Implement joins with golang templates ( #6429 )" ( #6560 )
...
This reverts commit 8b125d6c5d
.
2023-03-10 10:39:02 -06:00
a8433b18e4
fix: Prevent infinite redirects on oidc errors ( #6550 )
...
* fix: Prevent infinite redirects on bad oidc scopes
* Show oidc errors
2023-03-10 10:12:29 -06:00
8b125d6c5d
chore: Implement joins with golang templates ( #6429 )
...
* feat: Implement view for workspace builds to include rbac info
* Removes the need to fetch the workspace to run an rbac check.
* chore: Use workspace build as RBAC object
* chore: Use golang templates instead of sqlc files
2023-03-10 09:44:38 -06:00
90901ca129
fix: panic on deleted template ( #6553 )
2023-03-10 12:26:11 +01:00
6023264a81
fix: typo in error message ( #6551 )
...
* fix: typo in error message
* fix
2023-03-10 09:20:22 +00:00
7f25d31745
feat: Allow changing the 'group' oidc claim field ( #6546 )
...
* feat: Allow changing the 'group' oidc claim field
* Enable empty groups support
* fix: Delete was wiping all groups, not just the single user's groups
* Update docs
* fix: Dbfake delete group member fixed
2023-03-09 23:31:38 -06:00
70b093ff2a
fix: filter session count sums by created_at
( #6529 )
...
Fixes the session totals being waaaaay too high!
2023-03-09 17:08:41 +02:00
1cc10f2ffb
fix: only sum connection latencies when they are set ( #6524 )
...
This was producing a median that didn't make sense.
2023-03-09 03:53:09 +00:00
1199a9330a
chore: add fly.io install source ( #6509 )
2023-03-09 03:16:55 +00:00
5304b4e483
feat: add connection statistics for workspace agents ( #6469 )
...
* fix: don't make session counts cumulative
This made for some weird tracking... we want the point-in-time
number of counts!
* Add databasefake query for getting agent stats
* Add deployment stats endpoint
* The query... works?!?
* Fix aggregation query
* Select from multiple tables instead
* Fix continuous stats
* Increase period of stat refreshes
* Add workspace counts to deployment stats
* fmt
* Add a slight bit of responsiveness
* Fix template version editor overflow
* Add refresh button
* Fix font family on button
* Fix latest stat being reported
* Revert agent conn stats
* Fix linting error
* Fix tests
* Fix gen
* Fix migrations
* Block on sending stat updates
* Add test fixtures
* Fix response structure
* make gen
2023-03-08 21:05:45 -06:00
d67552f852
fix: add more cached certificates to azure instance identity ( #6519 )
...
This was failing for GovCloud. Now it falls back to fetch, and a test
has been added to notify when certificates are becoming outdated.
2023-03-08 19:32:10 -06:00
3b87316ad7
feat: propagate job error codes ( #6507 )
...
* feat: propagate job error_code
* fix
* Fix
* Fix
* Fix
* add errors to typesGenerated
* Address PR comments
* Fix
2023-03-08 16:32:00 +01:00
524b14adbc
fix: fetch provisioner logs after end of logs message ( #6495 )
...
I think this should _actually_ fix it. See
https://github.com/coder/coder/actions/runs/4358242625/jobs/7618562167
The problem was that this loop is ran async so even though
messages are sent in order, we were processing too slowly and
the end of logs was published first.
2023-03-09 01:13:08 +10:00
3b73321a6c
feat: refactor deployment config ( #6347 )
2023-03-07 15:10:01 -06:00
bb0a996fc2
chore: fix buffered provisioner job logs close flake ( #6492 )
...
See https://github.com/coder/coder/actions/runs/4357599919/jobs/7617111287
2023-03-07 20:08:13 +00:00
1bdd2abed7
feat: use JWT ticket to avoid DB queries on apps ( #6148 )
...
Issue a JWT ticket on the first request with a short expiry that
contains details about which workspace/agent/app combo the ticket is
valid for.
2023-03-07 19:38:11 +00:00
23bebb40e2
fix: bump migration to resolve duplicate id ( #6486 )
...
This happened because two PRs with different migrations
merged at the same time!
2023-03-07 10:04:06 -06:00
2d4706ac33
feat: mark coder_parameter as "required" ( #6433 )
...
* Add required column
* Pass through providerd
* Pass the required property down
* Optional
* Fix
* Fix
* Fix
* fix
* CLI create: support for optional fields
* Use HTML API to mark fields required
* Fix
* Improve validation
* more fixes
* make fmt
* Fix
* WIP
* Fix: test
* CLI update tets
* OptionalParameterAdded
* Fix: migration
2023-03-07 16:38:31 +01:00
ef2e86f309
increase default max-token-duration ( #6467 )
2023-03-07 06:35:48 -08:00
87ed7a7dba
chore: use nil map on agent stats to check if report interval should be returned ( #6479 )
...
See https://github.com/coder/coder/actions/runs/4350638262/jobs/7601537088
2023-03-07 14:25:04 +00:00
66a6b590a1
feat: add template max_ttl ( #6114 )
...
Co-authored-by: Bruno Quaresma <bruno@coder.com >
2023-03-07 14:14:58 +00:00
0c2b432c1b
feat: Add migration fixer script (for branches) ( #6466 )
2023-03-07 14:47:33 +02:00
fd02f73708
chore: ensure pubsub messages are delivered in order for in-memory variant ( #6474 )
...
PostgreSQL provides this guarantee, which led to some flakes in tests.
See: https://github.com/coder/coder/actions/runs/4350034299/jobs/7600478096
2023-03-07 04:36:25 +00:00
74632e460c
fix: adjust build state permission to require template update ( #6472 )
2023-03-07 04:24:32 +00:00