Skip to content

created workspace does not inherit the template's auto-off setting #6157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sharkymark opened this issue Feb 10, 2023 · 2 comments · Fixed by #6647
Closed

created workspace does not inherit the template's auto-off setting #6157

sharkymark opened this issue Feb 10, 2023 · 2 comments · Fixed by #6647
Assignees
Labels
s1 Bugs that break core workflows. Only humans may set this.

Comments

@sharkymark
Copy link
Contributor

Version: v0.17.0+a5f3f02

I have a template that defaults to auto-off to 2 hours.

image

I created a workspace in the CLI with the following command

coder create nodeJS -t docker-code-server -y

In the UI, the new workspace is set to 8 hours.

Is this a bug? Seems to defeat the purpose of template off settings

image

image

@bpmct bpmct added s1 Bugs that break core workflows. Only humans may set this. bug labels Feb 10, 2023
@mtojek mtojek self-assigned this Mar 17, 2023
@mtojek
Copy link
Member

mtojek commented Mar 17, 2023

Taking a look

@mtojek
Copy link
Member

mtojek commented Mar 17, 2023

Confirmed. If you create the workspace with CLI, it ignores user template settings. It works well if you use the site to create a workspace.

cliflag.DurationVarP(cmd.Flags(), &stopAfter, "stop-after", "", "CODER_WORKSPACE_STOP_AFTER", 8*time.Hour, "Specify a duration after which the workspace should shut down (e.g. 8h).")

(if user doesn't provide the stop-after, CLI will default to 8h)

I will try to fix it, shouldn't be hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s1 Bugs that break core workflows. Only humans may set this.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants