Commit Graph

2363 Commits

Author SHA1 Message Date
d37c3a130e Merge remote-tracking branch 'origin/main' into jjs/presets 2025-02-14 08:34:48 +00:00
db767286b9 chore: change returned response for missing permissions to 403 from 404 (#16562) 2025-02-13 17:05:20 -05:00
e38bd27183 feat(coderd): add support for provisioner job id and tag filter (#16556)
This change adds to new filters to the provisionerjobs endpoint, id
(array) and tags (map).

Updates #15084
Updates #15192
Related #16532
2025-02-13 18:24:27 +02:00
6f24977566 Merge branch 'jjs/presets-api' into jjs/presets 2025-02-12 12:51:39 +00:00
71cbf735e5 feat(coderd): add support for presets to the coder API (#16526)
This pull request builds on the existing migrations and queries to add
support for presets to the coder API.
2025-02-12 14:41:14 +02:00
af4eb7f754 make -B gen 2025-02-12 12:29:07 +00:00
22eb048690 Merge remote-tracking branch 'origin/main' into jjs/presets-api 2025-02-12 12:11:52 +00:00
ce013a52aa improve test 2025-02-12 12:11:41 +00:00
63b57707eb fix test 2025-02-12 12:03:59 +00:00
ce2956d1a7 generate ids for presets by default 2025-02-12 10:13:43 +00:00
c31ee7b263 fix test 2025-02-12 08:39:17 +00:00
4fa66746ad make -B gen 2025-02-12 08:25:09 +00:00
b3964087c4 fix: handle urls with multiple slashes (#16527)
Fixes: https://github.com/coder/coder/issues/9877

This PR introduces another middleware to rewrite URLs when multiple
slashes are used.
2025-02-12 09:23:28 +01:00
341c2b4a2b simplify 2025-02-12 08:03:34 +00:00
257988757b remove todos 2025-02-12 07:54:01 +00:00
212e536679 consolidate preset API endpoints 2025-02-12 07:41:24 +00:00
e85da8b02b chore: return template data for provisioner daemons (#16514)
Return template data in provisioner jobs to be displayed in the
provisioners page.
2025-02-11 14:22:34 -03:00
e4b5f0d2c3 fix test 2025-02-11 14:31:34 +00:00
dcf47ab30d feat(coderd): add support for presets to the coder API 2025-02-11 14:23:14 +00:00
7c5de398f9 Merge remote-tracking branch 'origin/main' into jjs/presets 2025-02-11 14:04:37 +00:00
34b46f9205 feat(coderd/database): add support for presets (#16509)
This pull requests adds the necessary migrations and queries to support
presets within the coderd database. Future PRs will build functionality
to the provisioners and the frontend.
2025-02-11 13:55:09 +02:00
4867cbe53d feat(cli): display devcontainers in show command (#16515)
Displays running devcontainers into the `coder show` CLI command.
2025-02-11 09:20:55 +00:00
6e7ccfdf1d Merge branch 'main' into jjs/presets 2025-02-11 07:25:55 +00:00
d0a534e30d chore: prevent authentication of non-unique oidc subjects (#16498)
Any IdP returning an empty field here breaks the assumption of a
unique subject id. This is defined in the OIDC spec.
2025-02-10 09:31:08 -06:00
e9b3561677 refactor: return template_icon and make metadata required (#16496) 2025-02-10 10:00:34 -03:00
31b1ff7d3b feat(agent): add container list handler (#16346)
Fixes https://github.com/coder/coder/issues/16268

- Adds `/api/v2/workspaceagents/:id/containers` coderd endpoint that allows listing containers
visible to the agent. Optional filtering by labels is supported.
- Adds go tools to the `coder-dylib` CI step so we can generate mocks if needed
2025-02-10 11:29:30 +00:00
a0f59a540b fix tests 2025-02-07 14:22:19 +00:00
04794e6fb8 Merge remote-tracking branch 'origin/main' into jjs/presets 2025-02-07 08:11:01 +00:00
f22885599f fix tests 2025-02-07 07:59:49 +00:00
b04d883348 feat: add provisioner job metadata (#16454)
This change adds metadata to provisioner jobs to help with rendering
related tempaltes and workspaces in the UI.

Updates #15084
2025-02-06 16:19:20 +02:00
689d49c868 renumber migrations 2025-02-06 07:38:33 +00:00
00f1ec30df Add tests 2025-02-06 07:36:10 +00:00
2f0c60fda4 Renumber migrations 2025-02-06 07:20:03 +00:00
3880dc8b93 add support for coder workspace presets in the provisioners 2025-02-06 07:20:03 +00:00
a546a85975 fix(coderd): set default provisionerjobs limit to 50 (#16450) 2025-02-05 15:04:35 +00:00
3d4552faaa Fix InsertPresetParameters 2025-02-05 14:03:37 +00:00
8d2a8f1527 make -B fmt lint 2025-02-05 14:03:37 +00:00
bf9e0a4749 feat(site): add presets to workspace creation page
* Add frontend components to pick a preset
* Add api endpoints to list presets and fetch their parameters
* update database queries based on new insights about how the frontend uses presets
2025-02-05 14:03:37 +00:00
45afcc668a Review notes and test fixing 2025-02-05 14:03:37 +00:00
353f5a9555 fix dbmem tests 2025-02-05 14:03:37 +00:00
f320807a16 make lint 2025-02-05 14:03:37 +00:00
b68ad3d39e implement panicking functions in dbmem 2025-02-05 14:03:37 +00:00
2fca3693fc adds support for workspace presets to the coderd database. Support in the API and web frontend will be added in subsequent pull requests. This is the smallest meaningful contribution that I could get passing tests for.
* Add workspace preset tables to the database in a migration
* Add queries to manipulate workspace presets to the database
* Generate db related code for the newly added queries
* Implement new methods to satisfy the Querier interface in dbauthz, dbmem, dbmock and querymetrics
* Implement the required tests for dbauthz
* Update the audit table to track changes to the new column in workspace builds
2025-02-05 14:03:37 +00:00
c8ef7eb4f2 fix: log unsuccessful webhook response body as a string (#16439) 2025-02-05 13:22:20 +02:00
dbad69dbd9 chore: add workspace oom/ood notification templates (#16250) 2025-02-04 19:25:18 +00:00
7cbd77fd94 feat: improve resources_monitoring for OOM & OOD monitoring (#16241)
As requested for [this
issue](https://github.com/coder/internal/issues/245) we need to have a
new resource `resources_monitoring` in the agent.

It needs to be parsed from the provisioner and inserted into a new db
table.
2025-02-04 18:45:33 +01:00
a68d11506c chore: track disabled telemetry (#16347)
Addresses https://github.com/coder/nexus/issues/116.

## Core Concept

Send one final telemetry report after the user disables telemetry with
the message that the telemetry was disabled. No other information about
the deployment is sent in this report.

This final report is submitted only if the deployment ever had telemetry
on.

## Changes

1. Refactored how our telemetry is initialized.
2. Introduced the `TelemetryEnabled` telemetry item, which allows to
decide whether a final report should be sent.
3. Added the `RecordTelemetryStatus` telemetry method, which decides
whether a final report should be sent and updates the telemetry item.
4. Added tests to ensure the implementation is correct.
2025-02-03 14:50:55 +01:00
0e2ae10b47 feat: add additional patch routes for group and role idp sync (#16351) 2025-01-31 12:14:24 -07:00
2ace044e0b chore: track the first time html is served in telemetry (#16334)
Addresses https://github.com/coder/nexus/issues/175.

## Changes

- Adds the `telemetry_items` database table. It's a key value store for
telemetry events that don't fit any other database tables.
- Adds a telemetry report when HTML is served for the first time in
`site.go`.
2025-01-31 13:55:46 +01:00
6ea5c6f0ef fix: show user-auth provisioners for all organizations (#16350) 2025-01-30 14:08:27 -07:00