File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
enterprise/coderd/prebuilds Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,14 @@ func (c *StoreReconciler) reportHardLimitedPresets(snapshot *prebuilds.GlobalSna
321
321
// The second condition is important because a hard-limited preset that has become outdated is no longer relevant.
322
322
// Its associated prebuilt workspaces were likely deleted, and it's not meaningful to continue reporting it
323
323
// as hard-limited to the admin.
324
+ //
325
+ // This approach accounts for all relevant scenarios:
326
+ // Scenario #1: The admin created a new template version with the same preset names.
327
+ // Scenario #2: The admin created a new template version and renamed the presets.
328
+ // Scenario #3: The admin deleted a template version that contained hard-limited presets.
329
+ //
330
+ // In all of these cases, only the latest and non-deleted presets will be reported.
331
+ // All other presets will be ignored and eventually removed from Prometheus.
324
332
isPresetHardLimited := make (map [hardLimitedPresetKey ]bool )
325
333
for key , presets := range presetsMap {
326
334
for _ , preset := range presets {
You can’t perform that action at this time.
0 commit comments