Commit Graph

2381 Commits

Author SHA1 Message Date
c741a08147 WIP CODER_AGENT_TOKEN reuse
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:09 +00:00
7e1abd141c Claim prebuild and rename
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:08 +00:00
eebbeb54bc Discrimination between "outdated" and "extraneous" prebuilds, hardening reconciliation
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:08 +00:00
fdabb8cf07 Very basic prebuild reassignment
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:08 +00:00
9d5c6633de Generating short ID for prebuilds
Also dropped unnecessary CASTs

Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:07 +00:00
c227bb842f Control loop now handles reconciliation of multiple prebuilds-configured template versions
Correctly calculates extraneous prebuilds and returns offending prebuild IDs

Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:07 +00:00
a59a03d5f4 Add provision job metadata to identify prebuilds
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:06 +00:00
b7c43f663e Fixed bug in state query relating to multiple template versions & workspaces in partially-deleted statuses
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:06 +00:00
41a9778af0 Improving control loop resilience, fixing calculations
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:06 +00:00
cffd63450d Add prebuilds user to default org
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:05 +00:00
815ecbc74b Specify progress type
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:05 +00:00
981f61e272 Incorporate in-progress jobs into state calculation
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:04 +00:00
4b5555e918 Preset tables, latest workspace view, state logic improved
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:04 +00:00
281a76aad9 WIP on control loop
Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:04 +00:00
1150e206e0 Migrations
Exclude system users from users.sql queries

Signed-off-by: Danny Kopping <danny@coder.com>
2025-02-14 12:17:01 +00:00
2838fb14bc Merge branch 'jjs/presets-fe' into jjs/presets 2025-02-14 09:45:08 +00:00
8d08a644fd remove todos 2025-02-14 09:22:12 +00:00
b1aff3f94e Collect all todo testcases in a single file 2025-02-14 08:42:05 +00:00
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