chore: fix TestServer/Prometheus/DBMetricsDisabled test flake (#13453)

See: https://github.com/coder/coder/actions/runs/9352137263/job/25739550487#step:5:368
This commit is contained in:
Colin Adler
2024-06-03 15:38:59 -05:00
committed by GitHub
parent 2806752c7d
commit 40390ecc30
2 changed files with 44 additions and 33 deletions

View File

@ -120,9 +120,9 @@ func Workspaces(ctx context.Context, logger slog.Logger, registerer prometheus.R
if errors.Is(err, sql.ErrNoRows) {
// clear all series if there are no database entries
workspaceLatestBuildTotals.Reset()
} else {
logger.Warn(ctx, "failed to load latest workspace builds", slog.Error(err))
}
logger.Warn(ctx, "failed to load latest workspace builds", slog.Error(err))
return
}
jobIDs := make([]uuid.UUID, 0, len(builds))