- Notifications
You must be signed in to change notification settings - Fork905
Open
Labels
Description
Problem
Prebuilt workspaces can become stale over time due to factors such as:
- The monorepo cloned during the prebuild falling behind its origin.
- New VM AMIs or container images being released after the prebuild was created.
Currently, there is no API endpoint to invalidate prebuilt workspaces. Internally, invalidation is equivalent to deleting a workspace. Therefore, the new functionality should reuse the same mechanics as the existing delete workspace operation, which is performed via the API endpointPOST /workspaces/{workspace}/builds
.
While it will be possible to manually delete (both single and bulk) prebuilt workspaces from the UI once template admins are allowed to delete prebuilds (issue#18191), this can be a tedious and error-prone process for templates with many presets or a high number of prebuilds.
Proposed solution
- Add a new API endpoint to invalidateall prebuilt workspaces associated with theactive version of a given template.
- The action should be triggered via a single click in the UI by a user with the appropriate role (e.g.,
TemplateAdmin
). - Internally, this endpoint can perform a bulk delete of the associated prebuilt workspaces.
- Update the documentation if needed
Depends on#18191