- Notifications
You must be signed in to change notification settings - Fork1.1k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Reported by customer on ticket 4452.
If a workspace is built from a template which contains a parameter likevolume_size which is hidden by default and the user chooses a non default value for thevolume_size value (note thatmutable = true), then once the workspace is built they attempt to change an unrelated parameter such asinstance_type_amd oruser_shell the value forvolume_size will be reset to the default 300GB value. This results in the workspace then entering a failed state as it cannot shrink the volume. If thevolume_size parameter is NOT hidden by default, i.e.count is removed, then the issue does not occur.
Reported by customer running 2.25.3, confirmed still present on 2.26.1 and 2.27.0.
data "coder_parameter" "advanced_opts" { name = "advanced_opts" display_name = "Show Advanced Options" order = 100 form_type = "checkbox" type = "bool" mutable = true default = false}data "coder_parameter" "volume_size" { count = data.coder_parameter.advanced_opts.value == "true" ? 1 : 0 name = "volume_size" display_name = "Volume Size (GiB)" description = "Size of the home volume in GiB" type = "string" mutable = true order = 100 form_type = "dropdown" default = "300" option { name = "300 GiB" value = "300" } option { name = "400 GiB" value = "400" } option { name = "500 GiB" value = "500" }}data "coder_parameter" "instance_arch" { name = "instance_arch" display_name = "Arch" description = "Which chip architecture?" type = "string" mutable = false order = 1 form_type = "dropdown" default = "amd64" option { name = "64-bit (x86)" value = "amd64" } option { name = "64-bit (Arm)" value = "arm64" }}data "coder_parameter" "instance_type_amd" { count = data.coder_parameter.instance_arch.value == "amd64" ? 1 : 0 name = "instance_type_amd" display_name = "Instance Type" description = "What instance type should your workspace use?" type = "string" mutable = true order = 2 form_type = "dropdown" default = "c6a.4xlarge" option { name = "x86_64 - 8 vCPU, 16 GiB RAM" value = "c6a.2xlarge" } option { name = "x86_64 - 16 vCPU, 32 GiB RAM" value = "c6a.4xlarge" } option { name = "x86_64 - 32 vCPU, 64 GiB RAM" value = "c6a.8xlarge" } option { name = "x86_64 - 32 vCPU, 72 GiB RAM" value = "c5.9xlarge" }}
Screen.Recording.2025-10-10.at.10.23.36.am.mov
Reproduced on MacOS with Chrome and Firefox. No network calls or console errors are observed.
Relevant Log Output
Expected Behavior
Any parameter which is hidden by default is not reset to the default value when an unrelated parameter value is changed.
Steps to Reproduce
- Build a workspace with the template contents shared above, ensuring
volume_sizeis set to a non default value. - Open the workspace settings screen
- Modify the value of an unrelated setting
- Observe the value for
volume_sizeis reset to default value of 300GB
Environment
- Host OS: Kubernetes
- Coder version: 2.25.3, 2.26.1, 2.27.0
Additional Context
The issue occurs consistently, I have tested this on the latest version, The issue happens on multiple deployments