Repository navigation
Conversation
coder_parameter options from workflow display
untra
marked this pull request as ready for review
September 18, 2026 15:21
Contributor
Documentation CheckUpdates Needed
Automated review via Coder Agents |
Contributor
Author
|
stale PR; closing in favor of #29575 |
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.
CLIENT-697
Summary
A mutable
coder_parameterwhose selected option is removed from a template update but used in a workspace build could block further changes.With this PR it no longer blocks the workspace build. The stale value falls back to the parameter's default, and the substitution is reported as a warning rather than an error.
Problem
When a template update removes an option value that a workspace already selected, the stored value is no longer a member of the option set.
coder/previewrelays a per-parameterAny build that supplies no parameter values of its own build's values, so it fails with a 400. That includes autostart and prebuild reconciliation, not just the UI. In the web UI the preview websocket returns the same per-parameter error, which
disables "Update and start"; on a template with
required inputsinputs are disabled as well, leaving the user no way to select a valid option or proceed.The CLI appears unaffected only because it drops invalid options client-side and retries against the active version, so
coder sshmasked a server-side failure rather than avoiding it.Fix
ResolveParametersnow drops a carried-forward value parameter's options, letting the existing defaultbackfill supply the new default. Values supplied with the build or by a preset are still validated, since those were asked for explicitly,and immutable parameters are left alone because replahe immutability check instead. The value is checkedagainst the option set directly because the upstream diagnostic carries no machine-readable code to match on.
The preview endpoints render through
RenderReconciled, which re-renders without the dead value and attaches a warning carrying astale_optioncode, so the form shows the default option.The parameters page no longer disables its inputs via
?templateVersionId=, because the build it submits is the update the template requires. Without that query parameter the form stays disabled as before.