Commit Graph

22 Commits

Author SHA1 Message Date
Steven Masley 845407fe7a
chore: cover deadline crossing autostart border on start (#13115)
When starting a workspace, if the deadline crosses an autostart boundary, the deadline is set to autostart + TTL. 
This copies the behavior in `ActivityBumpWorkspace`, but does not require activity.
2024-05-01 10:43:04 -05:00
Steven Masley d789a60d47
chore: remove max_ttl from templates (#12644)
* chore: remove max_ttl from templates

Completely removing max_ttl as a feature on template scheduling. Must use other template scheduling features to achieve autostop.
2024-03-20 10:37:57 -05:00
Dean Sheather e1e352d8c1
feat: add template activity_bump property (#11734)
Allows template admins to configure the activity bump duration. Defaults to 1h.
2024-02-13 07:00:35 +00:00
Dean Sheather 1e49190e12
feat: add server flag to disable user custom quiet hours (#11124) 2023-12-15 19:33:51 +10:00
Dean Sheather b36071c6bb
feat: allow templates to specify max_ttl or autostop_requirement (#10920) 2023-12-15 18:27:56 +10:00
Cian Johnston a4f1319108
feat(cli): allow showing schedules for multiple workspaces (#10596)
* coder list: adds information about next start / stop to available columns (not default)
* coder schedule: show now essentially coder list with a different set of columns
* Updates cli schedule unit tests to use new dbfake

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2023-11-10 13:51:49 +00:00
Steven Masley 39c0539d42
feat: add controls to template for determining startup days (#10226)
* feat: template controls which days can autostart
* Add unit test to test blocking autostart with DaysOfWeek
2023-10-13 11:57:18 -05:00
Kayla Washburn efe804498b
feat: add quiet hours settings page (#9676) 2023-09-15 11:14:33 -06:00
Mathias Fredriksson ad23d33f28
refactor(coderd/schedule): move cron schedule to cron package (#9507)
This removes an indirect import of `coderd/database` from the CLI and
results in a logical separation between server related and generalized
schedule.

No size change (yet).

Ref: #9380
2023-09-04 16:48:25 +03:00
Mathias Fredriksson 19d7da3d24
refactor(coderd/database): split `Time` and `Now` into `dbtime` package (#9482)
Ref: #9380
2023-09-01 16:50:12 +00:00
Dean Sheather 1de61246a3
feat: add experimental template autostop requirement template settings UI (#9417) 2023-08-30 20:41:27 +00:00
Dean Sheather a572800d47
chore: rename template restart requirement to autostop requirement (#9295) 2023-08-29 18:35:05 +00:00
Jon Ayers 7f14b50dbe
chore: rename locked to dormant (#9290)
* chore: rename locked to dormant

- The following columns have been updated:
  - workspace.locked_at -> dormant_at
  - template.inactivity_ttl -> time_til_dormant
  - template.locked_ttl -> time_til_dormant_autodelete

This change has also been reflected in the SDK.

A route has also been updated from /workspaces/<id>/lock to /workspaces/<id>/dormant
2023-08-24 13:25:54 -05:00
Jon Ayers 6e41cd1eda
feat: add activity bumping to template scheduling (#9040) 2023-08-22 15:15:13 -05:00
Kyle Carberry 22e781eced
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path

go mod requires semantic versioning with versions greater than 1.x

This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```

Migrate generated files to import /v2

* Fix gen
2023-08-18 18:55:43 +00:00
Dean Sheather 47b8bf6585
feat: update workspace deadline when template policy changes (#8964) 2023-08-14 21:16:47 +00:00
Dean Sheather dc8b73168e
feat: add user quiet hours schedule and restart requirement feature flag (#8115) 2023-07-20 23:35:41 +10:00
Steven Masley aceedefce3
chore: add `template_with_user` view to include user contextual data (#8568)
* chore: Refactor template sql queries to use new view
* TemplateWithUser -> Template
* Add unit test to enforce good view
2023-07-19 16:07:33 -04:00
Jon Ayers c3aef9363b
feat: add locked TTL field to template meta (#8020) 2023-06-19 22:37:55 -04:00
Kira Pilot 5ffa6dae50
feat: add inactivity cleanup and failure cleanup configuration fields to Template Schedule Form (#7402)
* added workspace actions entitlement

* added workspace actions experiment

* added new route for template enterprise meta

* removing new route; repurposing old

* add new fields to get endpoints

* removed workspace actions experiment

* added logic to enterprise template store

* added new form fields

* feature flagged new fields

* fix validation

* fixed submit btn

* fix tests

* changed ttl defaults

* added FE tests

* added BE tests

* fixed lint

* adjusted comment language

* fixing unstaged changes check

* fix test

* Update coderd/database/migrations/000122_add_template_cleanup_ttls.down.sql

Co-authored-by: Dean Sheather <dean@deansheather.com>

* Update coderd/database/migrations/000122_add_template_cleanup_ttls.up.sql

Co-authored-by: Dean Sheather <dean@deansheather.com>

---------

Co-authored-by: Dean Sheather <dean@deansheather.com>
2023-05-05 08:19:26 -07:00
Dean Sheather e33941b7c2
feat: allow disabling autostart and custom autostop for template (#6933)
API only, frontend in upcoming PR.
2023-04-04 12:48:35 +00:00
Dean Sheather 66a6b590a1
feat: add template max_ttl (#6114)
Co-authored-by: Bruno Quaresma <bruno@coder.com>
2023-03-07 14:14:58 +00:00