Skip to content

bug: Workspace Settings UI shows misleading "Always" for Automatic Updates when require_active_version is enabled #22031

@uzair-coder07

Description

@uzair-coder07

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a template has require_active_version enabled, the Workspace Settings page displays the Automatic Updates field as "Always" and disables it with the helper text "The template for this workspace requires automatic updates." However, the actual stored value of automatic_updates on the workspace remains "never" (the default).

This is misleading because:
• Users and administrators believe the workspace's automatic_updates is set to "always"
• Any code path that reads the actual automatic_updates value from the API (such as the CLI) will see "never" and behave accordingly
• The display creates a false sense that the update policy is being enforced at the workspace level

Relevant Log Output

N/A

Expected Behavior

When require_active_version is enabled on a template, the server should automatically set (or treat) all associated workspaces' automatic_updates as "always" (not only from a UI perspective but also from a database state point of view). This ensures all consumers of the API see a consistent value.

Steps to Reproduce

  1. Create a template with Require workspaces automatically update when started (require_active_version in the CLI) enabled
  2. Create a workspace from the template
  3. Go to the settings page of the workspace and observe that the Automatic Updates field is set to Always. However, Database shows never when the workspaces table is queried.
Image Image

Environment

  • Host OS: Ubuntu 24.04 and Mac OS
  • Coder version: Reproduced on Coder server versions 2.26.6, 2.28.6, and 2.29.6

Additional Context

No response

Metadata

Metadata

Assignees

Labels

must-doIssues that must be completed by the end of the Sprint. Or else. Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions