Skip to content

feat: add customizable ttl_bump interval #10566

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
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update golden file
  • Loading branch information
Emyrk committed Nov 13, 2023
commit 4e295f886a9ffd998eb62d25c22f497fb96e7db0
5 changes: 5 additions & 0 deletions cli/testdata/coder_create_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ USAGE:
$ coder create <username>/<workspace_name>

OPTIONS:
--activity-bump duration (default: 0)
Specify a default amount of time to bump the deadline for the
workspaces based on workspace activity. By default, activity will
extend the deadline for a workspace by the 'stop-after' amount.

--automatic-updates string, $CODER_WORKSPACE_AUTOMATIC_UPDATES (default: never)
Specify automatic updates setting for the workspace (accepts 'always'
or 'never').
Expand Down
5 changes: 5 additions & 0 deletions cli/testdata/coder_templates_create_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ USAGE:
Create a template from the current directory or as specified by flag

OPTIONS:
--default-activity-bump duration (default: 0)
Specify a default amount of time to bump the deadline for the
workspaces based on workspace activity. By default, activity will
extend the deadline for a workspace by the 'default-ttl' amount.

--default-ttl duration (default: 24h)
Specify a default TTL for workspaces created from this template. It is
the default time before shutdown - workspaces created from this
Expand Down
5 changes: 5 additions & 0 deletions cli/testdata/coder_templates_edit_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ OPTIONS:
this value for the template (and allow autostart on all days), pass
'all'.

--default-activity-bump duration (default: 0)
Specify a default amount of time to bump the deadline for the
workspaces based on workspace activity. By default, activity will
extend the deadline for a workspace by the 'default-ttl' amount.

--default-ttl duration
Edit the template default time before shutdown - workspaces created
from this template default to this value. Maps to "Default autostop"
Expand Down
2 changes: 1 addition & 1 deletion cli/testdata/coder_templates_list_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OPTIONS:
-c, --column string-array (default: name,last updated,used by)
Columns to display in table output. Available columns: name, created
at, last updated, organization id, provisioner, active version id,
used by, default ttl.
used by, default ttl, default ttl bump.

-o, --output string (default: table)
Output format. Available formats: table, json.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { getValidationSchema } from "./TemplateSettingsForm";
import { TemplateSettingsPage } from "./TemplateSettingsPage";

type FormValues = Required<
Omit<UpdateTemplateMeta, "default_ttl_ms" | "max_ttl_ms">
Omit<
UpdateTemplateMeta,
"default_ttl_ms" | "max_ttl_ms" | "default_ttl_bump_ms"
>
>;

const validFormValues: FormValues = {
Expand Down
1 change: 1 addition & 0 deletions site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ export const MockTemplate: TypesGen.Template = {
},
description: "This is a test description.",
default_ttl_ms: 24 * 60 * 60 * 1000,
default_ttl_bump_ms: 0,
max_ttl_ms: 2 * 24 * 60 * 60 * 1000,
autostop_requirement: {
days_of_week: [],
Expand Down