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

Commit0497f8b

Browse files
committed
fix: UpdatePrebuildProvisionerJobWithCancel to filter by non-active template version
1 parentdcb6de1 commit0497f8b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

‎coderd/database/queries.sql.go‎

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

‎coderd/database/queries/prebuilds.sql‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,11 @@ WHERE id IN (
308308
SELECTpj.id
309309
FROM provisioner_jobs pj
310310
INNER JOIN workspace_prebuild_builds wpbONwpb.job_id=pj.id
311+
INNER JOIN workspaces wONw.id=wpb.workspace_id
312+
INNER JOIN templates tONt.id=w.template_id
311313
WHERE
312-
wpb.template_version_preset_id= @preset_id
314+
wpb.template_version_id!=t.active_version_id
315+
ANDwpb.template_version_preset_id= @preset_id
313316
-- Only considers initial builds, i.e. created by the reconciliation loop
314317
ANDwpb.build_number=1
315318
-- Only consider 'start' transitions (provisioning), not 'stop'/'delete' (deprovisioning)

‎coderd/prebuilds/global_snapshot.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ import (
88

99
"cdr.dev/slog"
1010

11-
"github.com/coder/quartz"
12-
1311
"github.com/coder/coder/v2/coderd/database"
1412
"github.com/coder/coder/v2/coderd/util/slice"
13+
"github.com/coder/quartz"
1514
)
1615

1716
// GlobalSnapshot represents a full point-in-time snapshot of state relating to prebuilds across all templates.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp