Skip to content

feat: implement expiration policy logic for prebuilds #17996

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 15 commits into from
May 26, 2025
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'origin/main' into ssncferreira/feat-pre…
…builds-cache-invalidation
  • Loading branch information
ssncferreira committed May 26, 2025
commit 7666090e5bbe4068a488b28cb3d6d465918fcd58
7 changes: 7 additions & 0 deletions enterprise/coderd/prebuilds/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,13 @@ func (c *StoreReconciler) executeReconciliationAction(ctx context.Context, logge
action.Create = desired
}

// If preset is hard-limited, and it's a create operation, log it and exit early.
// Creation operation is disallowed for hard-limited preset.
if ps.IsHardLimited && action.Create > 0 {
logger.Warn(ctx, "skipping hard limited preset for create operation")
return nil
}

var multiErr multierror.Error
for range action.Create {
if err := c.createPrebuiltWorkspace(prebuildsCtx, uuid.New(), ps.Preset.TemplateID, ps.Preset.ID); err != nil {
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.