Skip to content

feat(coderd): add a hidden flag to disable dynamic parameter closure evaluation - #29356

Draft
Emyrk wants to merge 1 commit into
preview-closure/bump-previewfrom
preview-closure/full-evaluation-flag
Draft

Emyrk wants to merge 1 commit into
preview-closure/bump-previewfrom
preview-closure/full-evaluation-flag

Conversation

@Emyrk

@Emyrk Emyrk commented Sep 15, 2026

Copy link
Copy Markdown
Member

Adds a hidden deployment flag that turns off preview's resource closure optimization, so a template that renders incorrectly with it can be worked around without a coder release.

  • CODER_DYNAMIC_PARAMETERS_FULL_EVALUATION / --dynamic-parameters-full-evaluation (hidden, default false) on DeploymentValues.
  • dynamicparameters.PreviewOptions(dv) maps it to preview.OptionFullEvaluation(); dynamicparameters.WithPreviewOptions threads it through the loader to preview.Preview.
  • Wired at the three render paths that hold deployment values: the template version tags extractor, the dynamic parameters websocket, and wsbuilder builds created from coderd (which call .DeploymentValues(...)).

Not covered: the autobuild lifecycle executor and the enterprise prebuilds reconciler construct wsbuilder without deployment values, so builds started from those paths use preview's default regardless of the flag. Those only re-render for builds, not the keystroke websocket path the optimization targets.

Prepared with Coder Agents assistance.

preview now evaluates only the parameter, preset, and tag closure by
default. CODER_DYNAMIC_PARAMETERS_FULL_EVALUATION restores evaluating
every resource, so a misbehaving template can be worked around without a
release. Threaded through dynamicparameters.PreviewOptions to the
template version tags, dynamic parameters websocket, and workspace
builder render paths.

Emyrk commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Emyrk Emyrk changed the title feat: add a hidden flag to disable dynamic parameter closure evaluation feat(coderd): add a hidden flag to disable dynamic parameter closure evaluation Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant