Garrett Delfosse
8ba05a9052
feat: add switch http(s) button to error page ( #12942 )
2024-04-26 11:52:53 -04:00
Kayla Washburn-Love
74f27719b8
feat: specify a custom "terms of service" link ( #13068 )
2024-04-25 16:36:51 -06:00
Cian Johnston
a518047f10
chore(coderd): provisionerdserver: downgrade heartbeat failure log to Warn instead of Error ( #13061 )
2024-04-24 09:36:36 +01:00
Pavel Aseev
4682355eed
chore: deprecate gauge metrics with _total suffix ( #12744 ) ( #12976 )
...
* chore: deprecate gauge metrics with _total suffix (#12744 )
Deprecated metrics:
- coderd_oauth2_external_requests_rate_limit_total
- coderd_api_workspace_latest_build_total
* Apply suggestions from code review
add link to follow-up issue
Co-authored-by: Cian Johnston <public@cianjohnston.ie>
---------
Co-authored-by: Cian Johnston <public@cianjohnston.ie>
2024-04-24 11:23:24 +03:00
Mathias Fredriksson
a69fc657f2
chore(coderd/database): reduce dbpurge load with smaller batches of agent stats ( #13049 )
2024-04-23 15:01:56 +03:00
Cian Johnston
e57ca3cdaa
feat(scripts): add script to check schema between migrations ( #13037 )
...
- migrations: allow passing in a custom migrate.FS
- gen/dump: extract some functions to dbtestutil
- scripts: write script to test migrations
2024-04-23 12:43:14 +01:00
Kayla Washburn-Love
fab5591cf6
chore: change `site_configs.value` to `text` ( #13036 )
...
* chore: change `site_configs.value` to `text`
* `make gen`
2024-04-22 17:25:36 -06:00
Kyle Carberry
8d1220e0c8
chore: add generate script for azure instance identity ( #13028 )
...
* chore: add generate script for azure instance identity
This also adds new issuing certificates from:
https://learn.microsoft.com/en-us/azure/security/fundamentals/azure-ca-details?tabs=certificate-authority-chains
* Fix shell lint
* Fix shell fmt
* Fix RSA issuing certificate
2024-04-22 15:39:08 -04:00
dependabot[bot]
3af317317a
ci: bump crate-ci/typos from 1.19.0 to 1.20.9 in the github-actions group ( #13027 )
...
* ci: bump crate-ci/typos in the github-actions group
Bumps the github-actions group with 1 update: [crate-ci/typos](https://github.com/crate-ci/typos ).
Updates `crate-ci/typos` from 1.19.0 to 1.20.9
- [Release notes](https://github.com/crate-ci/typos/releases )
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crate-ci/typos/compare/v1.19.0...v1.20.9 )
---
updated-dependencies:
- dependency-name: crate-ci/typos
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
* Add `pn` exclusion
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kyle Carberry <kyle@carberry.com>
2024-04-22 10:25:23 -04:00
Mathias Fredriksson
3adcccb618
fix(coderd/database): reduce db load via dbpurge advisory locking ( #13021 )
2024-04-22 11:10:32 +00:00
Mathias Fredriksson
e17e8aa3c9
feat(coderd/database): keep only 1 day of `workspace_agent_stats` after rollup ( #12674 )
2024-04-22 13:11:50 +03:00
Colin Adler
3aa0d73811
chore: fix down migration 196 ( #13006 )
...
It didn't account for null values.
2024-04-18 18:47:02 -05:00
Mathias Fredriksson
92190443ff
fix(coderd/metricscache): avoid logging error for no rows ( #12988 )
...
Fixes #12938
2024-04-17 20:43:13 +03:00
Colin Adler
777dfbe965
feat(enterprise): add ready for handshake support to pgcoord ( #12935 )
2024-04-16 15:01:10 -05:00
Colin Adler
942e90270e
fix: disable azureidentity test on darwin ( #12979 )
...
See https://github.com/coder/coder/issues/12978
2024-04-16 19:33:04 +00:00
Colin Adler
231fc26c92
fix(coderd): properly calculate query latency for tailnet queries ( #12944 )
...
The defer used seems correct, but the `time.Since` will always resolve
immediately since it's a param to the deferred function.
2024-04-16 19:03:27 +00:00
Colin Adler
ba52a4fbe2
chore: fix linting issue ( #12945 )
...
The error wasn't used.
2024-04-16 13:50:46 -05:00
Cian Johnston
8e1e0f04a4
feat(cli): support bundle: show links to docs/admin/healthcheck ( #12974 )
2024-04-16 16:21:09 +01:00
Cian Johnston
407e61ecd4
feat(cli): support bundle: dump healthcheck summary ( #12963 )
...
* refactor(codersdk): extract common fields from HealthReport and friends
* feat(codersdk/healthsdk): add Summarize() method
* feat(cli): support bundle: dump healthcheck summary
2024-04-16 13:31:56 +01:00
Kyle Carberry
41ca6e4f7f
chore: add `created_at` to workspace resource telemetry ( #12969 )
2024-04-15 20:06:59 +00:00
Cian Johnston
9a4703a311
feat(coderd/healthcheck): improve detection of STUN issues ( #12951 )
...
Adds checks to coderd/healthcheck/derphealth for STUN issues:
- Alerts if there is not least one healthy STUN server,
- Alerts if we see variable port mapping.
2024-04-15 17:10:49 +01:00
Kayla Washburn-Love
2ad7fcc0b7
fix: show template autostop setting when it overrides the workspace setting ( #12910 )
2024-04-11 13:08:51 -06:00
Spike Curtis
a231b5aef5
feat: add src_id and dst_id indexes to tailnet_tunnels ( #12911 )
...
Fixes #12780
Adds indexes to the `tailnet_tunnels` table to speed up `GetTailnetTunnelPeerIDs` and `GetTailnetTunnelPeerBindings` queries, which match on `src_id` and `dst_id`.
2024-04-11 10:05:53 +04:00
Steven Masley
566f8f231d
chore: add unit test for pass through external auth query params ( #12928 )
...
* chore: verify pass through external auth query params
Unit test added to verify behavior of query params set in the
auth url for external apps. This behavior is intended to specifically
support Auth0 audience query param.
2024-04-10 13:58:29 -05:00
Steven Masley
838e8df5be
chore: merge apikey/token session config values ( #12817 )
...
* chore: merge apikey/token session config values
There is a confusing difference between an apikey and a token. This
difference leaks into our configs. This change does not resolve the
difference. It only groups the config values to try and manage any
bloat that occurs from adding more similar config values
2024-04-10 10:34:49 -05:00
Garrett Delfosse
acaa254099
feat: link with protocol on shared ports ( #12908 )
2024-04-10 09:29:24 -04:00
Spike Curtis
5469011018
fix: stop logging session shutdown as warning ( #12922 )
...
A customer hit like 200k of ErrSessionShutdown, which just dupes any errors we would have generated when shutting down the session for e.g. Ping failures.
2024-04-10 11:50:46 +04:00
Steven Masley
0a8c8ce5cc
chore: remove InsertWorkspaceAgentStat query ( #12869 )
...
* chore: remove InsertWorkspaceAgentStat query
InsertWorkspaceAgentStats (batch) exists. We only used the singular in
a single unit test place. Removing the single for the batch, reducing
the interface size.
2024-04-09 12:35:27 -05:00
Garrett Delfosse
1d4bf30c0d
feat: add s suffix to use HTTPS for ports ( #12862 )
2024-04-09 12:06:22 -04:00
Steven Masley
189b8626d0
chore: deprecate agent report-stats endpoint ( #12880 )
...
* chore: deprecate agent report-stats endpoint
Agent API is now used instead.
* Update coderd/workspaceagents.go
Co-authored-by: Spike Curtis <spike@coder.com>
---------
Co-authored-by: Spike Curtis <spike@coder.com>
2024-04-09 09:38:26 -05:00
coryb
d82f2fd416
fix: update typo in audit log field ( #12907 )
2024-04-08 13:57:38 -05:00
Spike Curtis
3b7380fa00
fix: fix race in assertWorkspaceLastUsedAtUpdated ( #12899 )
...
fixes #12789
Stats are collected asynchronously with respect to sessions ending. Flush repeatedly so that we pick up the collection if we missed it.
2024-04-08 16:22:33 +04:00
Garrett Delfosse
f96ce80ab9
feat: add owner groups to workspace data ( #12841 )
2024-04-05 15:06:17 -04:00
Colin Adler
a2b28f80d7
fix(coderd): prevent agent reverse proxy from using `HTTP[S]_PROXY` envs ( #12875 )
...
Updates https://github.com/coder/coder/issues/12790
2024-04-05 12:29:08 -05:00
Steven Masley
a3187dc30f
chore: enforce unique linked_ids ( #12815 )
...
* chore: enforce unique linked_ids
Duplicate linked_ids make no sense. 2 users cannot share the same
source user from a provider
2024-04-03 13:17:11 -05:00
Kayla Washburn-Love
f705f9a5eb
test: ensure `RequireActiveVersion` is actually set when testing with AGPL store ( #12843 )
2024-04-02 11:29:22 -06:00
Steven Masley
b5b5c37d03
docs: describe mutually exclusive create workspace template fields ( #12834 )
...
* docs: describe mutually exclusive create workspace template fields
Ideally we could do this in the OpenAPI spec, but there is no first
class "mutually exclusive" feature in OpenAPI. So in lieu of something
more complex, or changing our struct/validation, a description comment
should suffice.
* chore: Add description to code sample as well
2024-04-02 10:11:24 -05:00
Danny Kopping
79fb8e43c5
feat: expose workspace statuses (with details) as a prometheus metric ( #12762 )
...
Implements #12462
2024-04-02 09:57:36 +02:00
Steven Masley
eeb3d63be6
chore: merge authorization contexts ( #12816 )
...
* chore: merge authorization contexts
Instead of 2 auth contexts from apikey and dbauthz, merge them to
just use dbauthz. It is annoying to have two.
* fixup authorization reference
2024-03-29 10:14:27 -05:00
Steven Masley
8cf1e84bb5
chore: ensure root handler has sudomain app mw ( #12812 )
...
Enterprise routes like scim touch this.
2024-03-28 15:49:43 -05:00
Mathias Fredriksson
79441e3609
perf(coderd/database): optimize `GetWorkspaceAgentAndLatestBuildByAuthToken` ( #12809 )
2024-03-28 19:38:16 +02:00
Mathias Fredriksson
d50c20c453
fix(coderd/database): add fk index for `workspace_agent_scripts` ( #12791 )
2024-03-28 14:31:58 +02:00
Danny Kopping
d734f3fb74
chore: reduce azure CA cert validity check period to 2 months ( #12788 )
...
Signed-off-by: Danny Kopping <danny@coder.com>
2024-03-28 11:17:02 +02:00
Mathias Fredriksson
539d6b0f3b
test(coderd): fix template name too long in TestPatchTemplateMeta ( #12781 )
2024-03-27 18:25:42 +02:00
Mathias Fredriksson
421bf7e785
fix(coderd): use insights for DAUs, simplify metricscache ( #12775 )
...
Fixes #12134
Fixes https://github.com/coder/customers/issues/384
Refs #12122
2024-03-27 18:10:14 +02:00
Mathias Fredriksson
47fd190064
fix(coderd/database): improve perf of `GetTemplateInsightsByInterval` ( #12773 )
...
Refs #12122
2024-03-27 14:10:46 +02:00
Mathias Fredriksson
ba1eaceda4
feat(coderd): add sftp to insights apps ( #12675 )
2024-03-27 14:09:29 +02:00
Mathias Fredriksson
0da29d74ac
fix(coderd/database): improve query perf of `GetTemplateAppInsights` ( #12767 )
...
Refs #12122
2024-03-27 12:28:36 +02:00
Ammar Bandukwala
0d9010e150
chore: fix 30% startup time hit from userpassword ( #12769 )
...
pbkdf2 is too expensive to run in init, so this change makes it load
lazily. I introduced a lazy package that I hope to use more in my
`GODEBUG=inittrace=1` adventure.
Benchmark results:
```
$ hyperfine "coder --help" "coder-new --help"
Benchmark 1: coder --help
Time (mean ± σ): 82.1 ms ± 3.8 ms [User: 93.3 ms, System: 30.4 ms]
Range (min … max): 72.2 ms … 90.7 ms 35 runs
Benchmark 2: coder-new --help
Time (mean ± σ): 52.0 ms ± 4.3 ms [User: 62.4 ms, System: 30.8 ms]
Range (min … max): 41.9 ms … 62.2 ms 52 runs
Summary
coder-new --help ran
1.58 ± 0.15 times faster than coder --help
```
2024-03-26 20:47:14 -05:00
Colin Adler
4d5a7b2d56
chore(codersdk): move all tailscale imports out of `codersdk` ( #12735 )
...
Currently, importing `codersdk` just to interact with the API requires
importing tailscale, which causes builds to fail unless manually using
our fork.
2024-03-26 12:44:31 -05:00