Skip to content

fix: exclude prebuilt workspaces from lifecycle executor (cherry-pick #18762) #18858

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

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix: exclude prebuilt workspaces from lifecycle executor (#18762)

Description

This PR updates the lifecycle executor to explicitly exclude prebuilt
workspaces 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) are
handled separately by the prebuild reconciliation loop. Including them
in the lifecycle executor could lead to unintended behavior such as
incorrect 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 TTL

Fixes: #18740
Related to: #18658

ssncferreira and others added 2 commits July 14, 2025 15:47
## Description

This PR updates the lifecycle executor to explicitly exclude prebuilt
workspaces 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) are
handled separately by the prebuild reconciliation loop. Including them
in the lifecycle executor could lead to unintended behavior such as
incorrect 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 TTL

Fixes: #18740
Related to: #18658
@stirby stirby requested a review from matifali July 15, 2025 19:31
@stirby stirby merged commit 51e60b7 into release/2.24 Jul 15, 2025
36 of 38 checks passed
@stirby stirby deleted the cherry-pick-ee4025-release/2.24 branch July 15, 2025 19:47
@github-actions github-actions bot locked and limited conversation to collaborators Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants