Skip to content
Merged
Changes from 1 commit
Commits
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
Next Next commit
refactor: add minor comment
  • Loading branch information
evgeniy-scherbina committed Apr 28, 2025
commit 71d66af44ee50226562344dd17c3e4775d104bfa
2 changes: 2 additions & 0 deletions coderd/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,11 @@
if req.TemplateVersionPresetID != uuid.Nil {
// Try and claim an eligible prebuild, if available.
claimedWorkspace, err = claimPrebuild(ctx, prebuildsClaimer, db, api.Logger, req, owner)
// If claiming fails with an expected error (no claimable prebuilds or AGPL does not support prebuilds),
// we fall back to creating a new workspace. Otherwise, propagate the unexpected error.
if err != nil &&
!errors.Is(err, prebuilds.ErrNoClaimablePrebuiltWorkspaces) &&
!errors.Is(err, prebuilds.ErrAGPLDoesNotSupportPrebuilds) {

Check failure on line 657 in coderd/workspaces.go

View workflow job for this annotation

GitHub Actions / lint

empty-lines: extra empty line at the start of a block (revive)

return xerrors.Errorf("failed to claim prebuilt workspace: %w", err)
}
Expand Down
Loading