Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit211393a

Browse files
authored
fix: exclude prebuilt workspaces from lifecycle executor (#18762)
## DescriptionThis PR updates the lifecycle executor to explicitly exclude prebuiltworkspaces from being considered for lifecycle operations such as`autostart`, `autostop`, `dormancy`, `default TTL` and `failure TTL`.Prebuilt workspaces (i.e., those owned by the prebuild system user) arehandled separately by the prebuild reconciliation loop. Including themin the lifecycle executor could lead to unintended behavior such asincorrect scheduling or state transitions.## Changes* Updated the lifecycle executor query`GetWorkspacesEligibleForTransition` to exclude workspaces with`owner_id = 'c42fdf75-3097-471c-8c33-fb52454d81c0'` (prebuilds).* Added tests to verify prebuilt workspaces are not considered in: * Autostop * Autostart * Default TTL * Dormancy * Failure TTLFixes:#18740Related to:#18658
1 parent0118e75 commit211393a

File tree

14 files changed

+1204
-18
lines changed

14 files changed

+1204
-18
lines changed

‎coderd/apidoc/docs.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/autobuild/lifecycle_executor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ func isEligibleForAutostart(user database.User, ws database.Workspace, build dat
520520
returnfalse
521521
}
522522

523+
// Get the next allowed autostart time after the build's creation time,
524+
// based on the workspace's schedule and the template's allowed days.
523525
nextTransition,err:=schedule.NextAllowedAutostart(build.CreatedAt,ws.AutostartSchedule.String,templateSchedule)
524526
iferr!=nil {
525527
returnfalse

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp