- Notifications
You must be signed in to change notification settings - Fork1.1k
fix: set prebuilds lifecycle parameters on creation and claim#19252
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
6415069e32267185d24ab04a481d2761b7e4c847c92bc1070c42ef248653a338486f3fb2c130fe54ba2a5781268837b02a23e753bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -518,15 +518,23 @@ SET | ||
| autostart_schedule = $2, | ||
| next_start_at = $3 | ||
| WHERE | ||
| id = $1 | ||
| -- Prebuilt workspaces (identified by having the prebuilds system user as owner_id) | ||
| -- are managed by the reconciliation loop, not the lifecycle executor which handles | ||
| -- autostart_schedule and next_start_at | ||
| AND owner_id != 'c42fdf75-3097-471c-8c33-fb52454d81c0'::UUID; | ||
Comment on lines +521 to +525 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This seems more related to#19264? ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. As discussed internally will keep this constraint in this PR as per the PR description: | ||
| -- name: UpdateWorkspaceNextStartAt :exec | ||
| UPDATE | ||
| workspaces | ||
| SET | ||
| next_start_at = $2 | ||
| WHERE | ||
| id = $1 | ||
| -- Prebuilt workspaces (identified by having the prebuilds system user as owner_id) | ||
| -- are managed by the reconciliation loop, not the lifecycle executor which handles | ||
| -- next_start_at | ||
| AND owner_id != 'c42fdf75-3097-471c-8c33-fb52454d81c0'::UUID; | ||
| -- name: BatchUpdateWorkspaceNextStartAt :exec | ||
| UPDATE | ||
| @@ -550,15 +558,19 @@ UPDATE | ||
| SET | ||
| ttl = $2 | ||
| WHERE | ||
| id = $1 | ||
| -- Prebuilt workspaces (identified by having the prebuilds system user as owner_id) | ||
| -- are managed by the reconciliation loop, not the lifecycle executor which handles | ||
| -- ttl | ||
| AND owner_id != 'c42fdf75-3097-471c-8c33-fb52454d81c0'::UUID; | ||
| -- name: UpdateWorkspacesTTLByTemplateID :exec | ||
| UPDATE | ||
| workspaces | ||
| SET | ||
| ttl = $2 | ||
| WHERE | ||
| template_id = $1; | ||
| -- name: UpdateWorkspaceLastUsedAt :exec | ||
| UPDATE | ||
| @@ -791,6 +803,10 @@ FROM | ||
| WHERE | ||
| workspaces.id = $1 | ||
| AND templates.id = workspaces.template_id | ||
| -- Prebuilt workspaces (identified by having the prebuilds system user as owner_id) | ||
| -- are managed by the reconciliation loop, not the lifecycle executor which handles | ||
| -- dormant_at and deleting_at | ||
| AND owner_id != 'c42fdf75-3097-471c-8c33-fb52454d81c0'::UUID | ||
| RETURNING | ||
| workspaces.*; | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.