Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Document preset detection behaviour
  • Loading branch information
SasSwart committed Aug 18, 2025
commit 2c5647f94beb0a5924e3d351ae4609802fd484d7
5 changes: 3 additions & 2 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions coderd/database/queries/prebuilds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ ORDER BY t.name, tvp.name, o.name;
-- The query finds presets where all preset parameters are present in the provided parameters,
-- and returns the preset with the most parameters (largest subset).
WITH provided_params AS (
SELECT unnest(@parameter_names::text[]) AS name,
unnest(@parameter_values::text[]) AS value
SELECT
unnest(@parameter_names::text[]) AS name,
unnest(@parameter_values::text[]) AS value
),
preset_matches AS (
SELECT
Expand Down
11 changes: 1 addition & 10 deletions docs/admin/templates/extending-templates/prebuilt-workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Prebuilt workspaces are tightly integrated with [workspace presets](./parameters
1. The preset must define all required parameters needed to build the workspace.
1. The preset parameters define the base configuration and are immutable once a prebuilt workspace is provisioned.
1. Parameters that are not defined in the preset can still be customized by users when they claim a workspace.
1. If a user does not select a preset but provides parameters that match one or more presets, Coder will automatically select the most specific matching preset and assign a prebuilt workspace if one is available.

## Prerequisites

Expand Down Expand Up @@ -291,16 +292,6 @@ does not reconnect after a template update. This shortcoming is described in [th
and will be addressed before the next release (v2.23). In the interim, a simple workaround is to restart the workspace
when it is in this problematic state.

### Current limitations

The prebuilt workspaces feature has these current limitations:

- **Organizations**

Prebuilt workspaces can only be used with the default organization.

[View issue](https://github.com/coder/internal/issues/364)

### Monitoring and observability

#### Available metrics
Expand Down
Loading