mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: mark presets as validation_failed to prevent endless prebuild retries (#22085)
## Description - Updates `wsbuilder` to return a `BuildError` with `http.StatusBadRequest` to signify a "validation error" on missing or invalid parameters - Adds a short-circuit in `prebuilds.StoreReconciler` to mark presets for which creating a build returns a "validation error" as "validation failed" and skip further attempts to reconcile. - Adds a test to verify the above - Introduces a new Prometheus metric `coderd_prebuilt_workspaces_preset_validation_failed` to track the above Closes: https://github.com/coder/coder/issues/21237 --------- Co-authored-by: Cian Johnston <cian@coder.com>
This commit is contained in:
co-authored by
Cian Johnston
parent
dea451de41
commit
ca234f346d
@@ -265,6 +265,9 @@ coderd_prebuilt_workspaces_metrics_last_updated 0
|
||||
# HELP coderd_prebuilt_workspaces_preset_hard_limited Indicates whether a given preset has reached the hard failure limit (1 = hard-limited). Metric is omitted otherwise.
|
||||
# TYPE coderd_prebuilt_workspaces_preset_hard_limited gauge
|
||||
coderd_prebuilt_workspaces_preset_hard_limited{template_name="",preset_name="",organization_name=""} 0
|
||||
# HELP coderd_prebuilt_workspaces_preset_validation_failed Indicates whether a given preset has validation failures (1 = validation failed). Metric is omitted otherwise.
|
||||
# TYPE coderd_prebuilt_workspaces_preset_validation_failed gauge
|
||||
coderd_prebuilt_workspaces_preset_validation_failed{template_name="",preset_name="",organization_name=""} 0
|
||||
# HELP coderd_prebuilt_workspaces_reconciliation_paused Indicates whether prebuilds reconciliation is currently paused (1 = paused, 0 = not paused).
|
||||
# TYPE coderd_prebuilt_workspaces_reconciliation_paused gauge
|
||||
coderd_prebuilt_workspaces_reconciliation_paused 0
|
||||
|
||||
Reference in New Issue
Block a user