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

fix(enterprise/coderd/prebuilds): hard-limit preset if all create attempts failed#18551

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
johnstcn wants to merge1 commit intomainfromcj/bail-multiple-failed-prebuilds
Closed
Changes fromall commits
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
25 changes: 24 additions & 1 deletionenterprise/coderd/prebuilds/reconcile.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -583,7 +583,14 @@ func (c *StoreReconciler) executeReconciliationAction(ctx context.Context, logge
// 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")
logger.Warn(ctx, "skipping hard limited preset for create operation",
slog.F("preset_id", ps.Preset.ID.String()),
slog.F("preset_name", ps.Preset.Name),
slog.F("template_id", ps.Preset.TemplateID.String()),
slog.F("template_name", ps.Preset.TemplateName),
slog.F("template_version_id", ps.Preset.TemplateVersionID.String()),
slog.F("template_version_name", ps.Preset.TemplateVersionName),
)
return nil
}

Expand All@@ -595,6 +602,22 @@ func (c *StoreReconciler) executeReconciliationAction(ctx context.Context, logge
}
}

if len(multiErr.Errors) == int(action.Create) {
// All attempts to create prebuilds for this preset failed. There is no
// point in continuing reconciliation for this preset as it will just spam
// the logs with errors. Hard-limit and move on with our lives.
ps.IsHardLimited = true
logger.Warn(ctx, "hard-limiting preset due to all prebuild creation attempts failing",
slog.F("attempts", action.Create),
slog.F("preset_id", ps.Preset.ID.String()),
slog.F("preset_name", ps.Preset.Name),
slog.F("template_id", ps.Preset.TemplateID.String()),
slog.F("template_name", ps.Preset.TemplateName),
slog.F("template_version_id", ps.Preset.TemplateVersionID.String()),
slog.F("template_version_name", ps.Preset.TemplateVersionName),
)
}

return multiErr.ErrorOrNil()

case prebuilds.ActionTypeDelete:
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp