Skip to content

feat(cli): add --dormancy-threshold to coder templates push #32002

Open

Description

@coder

Part of #31998.

coder templates create --dormancy-threshold sets how long a workspace can be inactive before it becomes dormant ("Dormancy threshold" in the UI). coder templates push has no equivalent flag.

What to change

  • New template: set CreateTemplateRequest.TimeTilDormantMillis.
  • Existing template: send UpdateTemplateMeta.TimeTilDormantMillis only when the user sets the flag.
  • License check required. This setting needs the Advanced Template Scheduling entitlement. On unlicensed (AGPL) deployments, the server keeps the old value without returning an error, so push would look like it worked when it didn't. Check entitlements first, the same way `create` and `edit` do. --failure-ttl, --dormancy-threshold and --dormancy-auto-deletion should share one check.

Scope: Small (S), about 20 lines plus a test. Add another 20 to 30 lines for whichever of the three adds the shared license check first.

Created on behalf of @angrycub

Activity

  1. linear-code commented on Nov 10, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions