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

Commitf6ea98b

Browse files
fix: hard-limiting should only apply to creation of prebuilds
1 parenta1a4f2a commitf6ea98b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

‎enterprise/coderd/prebuilds/reconcile.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,10 @@ func (c *StoreReconciler) ReconcilePreset(ctx context.Context, ps prebuilds.Pres
365365
c.metrics.trackHardLimitedStatus(ps.Preset.OrganizationName,ps.Preset.TemplateName,ps.Preset.Name,ps.IsHardLimited)
366366
}
367367

368-
// If the preset was previously hard-limited, log it and exit early.
369-
ifps.Preset.PrebuildStatus==database.PrebuildStatusHardLimited {
370-
logger.Warn(ctx,"skipping hard limited preset")
371-
returnnil
372-
}
373-
374368
// If the preset reached the hard failure limit for the first time during this iteration:
375369
// - Mark it as hard-limited in the database
376370
// - Send notifications to template admins
377-
ifps.IsHardLimited {
371+
ifps.Preset.PrebuildStatus!=database.PrebuildStatusHardLimited&&ps.IsHardLimited {
378372
logger.Warn(ctx,"skipping hard limited preset")
379373

380374
err:=c.store.UpdatePresetPrebuildStatus(ctx, database.UpdatePresetPrebuildStatusParams{
@@ -456,6 +450,14 @@ func (c *StoreReconciler) ReconcilePreset(ctx context.Context, ps prebuilds.Pres
456450
actions.Create=desired
457451
}
458452

453+
ifactions.Create>0 {
454+
// If the preset is hard-limited, log it and exit early.
455+
ifps.Preset.PrebuildStatus==database.PrebuildStatusHardLimited||ps.IsHardLimited {
456+
logger.Warn(ctx,"skipping hard limited preset")
457+
returnnil
458+
}
459+
}
460+
459461
varmultiErr multierror.Error
460462

461463
forrangeactions.Create {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp