feat: add template builder deployment config and telemetry types - #25082
Merged
jeremyruppel merged 4 commits intoMay 11, 2026
Merged
Conversation
Contributor
Docs preview📖 View docs preview for |
jeremyruppel
commented
May 8, 2026
Comment on lines
+2501
to
+2514
| // TemplateBuilderSession tracks a single event in the template builder | ||
| // wizard. Two events are emitted per session: one on wizard entry and | ||
| // one on compose completion. User-supplied variable values are never | ||
| // included. | ||
| type TemplateBuilderSession struct { | ||
| ID uuid.UUID `json:"id"` | ||
| EventType string `json:"event_type"` | ||
| UserID uuid.UUID `json:"user_id"` | ||
| BaseTemplateID string `json:"base_template_id,omitempty"` | ||
| ModuleIDs []string `json:"module_ids,omitempty"` | ||
| DurationSeconds float64 `json:"duration_seconds,omitempty"` | ||
| Success bool `json:"success,omitempty"` | ||
| CreatedAt time.Time `json:"created_at"` | ||
| } |
Contributor
Author
There was a problem hiding this comment.
it's important we include base template ID/module IDs in the wizard entry event because the goal is to make this builder URL-addressable, enabling pre-filled template builder forms and selections
jeremyruppel
marked this pull request as ready for review
May 8, 2026 17:21
aslilac
reviewed
May 8, 2026
| } | ||
| deploymentGroupTemplateBuilder = serpent.Group{ | ||
| Name: "Template Builder", | ||
| YAML: "templateBuilder", |
Member
There was a problem hiding this comment.
oh, I didn't even know about this. sure, this is a good approach 👍
aslilac
approved these changes
May 8, 2026
Add CODER_TEMPLATE_BUILDER_ENABLED and CODER_TEMPLATE_BUILDER_REGISTRY_URL deployment config options for the template builder feature. When disabled (the default), all /api/v2/templatebuilder/* endpoints return 404. - Add TemplateBuilderConfig struct with Enabled and RegistryURL fields - Register deployment options with Template Builder group - Add RequireTemplateBuilderEnabled middleware returning 404 when disabled - Register /templatebuilder route group in coderd.go with feature gate - Add TemplateBuilderSession telemetry struct to Snapshot for tracking wizard entry and compose completion events - Auto-generate TypeScript types, swagger docs, CLI help, and server config
- Rename CODER_TEMPLATE_BUILDER_ENABLED to CODER_DISABLE_TEMPLATE_BUILDER (default false = enabled by default), matching DisableWorkspaceSharing - Replace middleware-based gating with static if-guard in coderd.go - Remove templatebuilder middleware and test files (unused)
Co-authored-by: Kayla はな <mckayla@hey.com>
jeremyruppel
force-pushed
the
jeremy/devex-280-be-deployment-config-fields-telemetry-coderd
branch
from
May 11, 2026 13:39
937071c to
9c3b658
Compare
jeremyruppel
deleted the
jeremy/devex-280-be-deployment-config-fields-telemetry-coderd
branch
May 11, 2026 13:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
CODER_TEMPLATE_BUILDER_ENABLEDandCODER_TEMPLATE_BUILDER_REGISTRY_URLdeployment config options for the template builder feature (DEVEX-280). When disabled (the default), all/api/v2/templatebuilder/*endpoints return 404.TemplateBuilderConfigstruct withEnabledandRegistryURLfields, registered as serpent options in theTemplate Builderdeployment groupRequireTemplateBuilderEnabledmiddleware returns 404 (not 403) when the feature is off, hiding the endpoints entirely/templatebuilderroute group incoderd.gowith apiKey auth and the feature gate; sibling tickets (DEVEX-275, 276, 277, 279) add handlers under this groupTemplateBuilderSessiontelemetry struct on theSnapshot, tracking wizard entry and compose completion events; user-supplied variable values are excludedRefs https://linear.app/codercom/issue/DEVEX-280
Implementation plan
See the plan file for the full design rationale and decision log.
Key decisions:
Report()with partial snapshots for telemetry emission (matches CLI invocation pattern), rather than periodic DB collection.https://registry.coder.com./api/v2/templatebuilder(not org-scoped): the catalog is global, org only matters at template creation time.