style(backups): clear staticcheck findings in overlapping controllers

Drop a field-manager constant nothing uses in the MariaDB driver, switch
on the MongoDB operator's state as a tagged switch, and reword the error
strings of the MongoDB driver and the workload monitor so they do not
start with a capital. The errors keep their meaning and nothing matches
their text.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin committed 2026-11-13 11:37:42 +03:00
1 parent 238e85577e
commit 04fa87ccd1
3 files changed
+9 -11

No files matched your search

@@ -528,7 +528,7 @@ func (r *WorkloadMonitorReconciler) queryAllBucketMetrics(ctx context.Context, p
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("Prometheus returned status %d", resp.StatusCode)
return nil, fmt.Errorf("unexpected status %d from Prometheus", resp.StatusCode)
}
body, err := io.ReadAll(io.LimitReader(resp.Body, 4<<20))
@@ -549,7 +549,7 @@ func (r *WorkloadMonitorReconciler) queryAllBucketMetrics(ctx context.Context, p
return nil, fmt.Errorf("parsing Prometheus response: %w", err)
}
if promResp.Status != "success" {
return nil, fmt.Errorf("Prometheus query finished with status %q", promResp.Status)
return nil, fmt.Errorf("the Prometheus query finished with status %q", promResp.Status)
}
for _, r := range promResp.Data.Result {