Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba0bcf0

Browse files
committed
Review & linter feedback
Signed-off-by: Danny Kopping <[email protected]>
1 parent bb479c2 commit ba0bcf0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

enterprise/coderd/prebuilds/metricscollector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ func (*MetricsCollector) Describe(descCh chan<- *prometheus.Desc) {
7979
}
8080

8181
func (mc *MetricsCollector) Collect(metricsCh chan<- prometheus.Metric) {
82+
// nolint:gocritic // We need to set an authz context to read metrics from the db.
8283
ctx, cancel := context.WithTimeout(dbauthz.AsPrebuildsOrchestrator(context.Background()), 10*time.Second)
8384
defer cancel()
84-
// nolint:gocritic // just until we get back to this
8585
prebuildMetrics, err := mc.database.GetPrebuildMetrics(ctx)
8686
if err != nil {
8787
mc.logger.Error(ctx, "failed to get prebuild metrics", slog.Error(err))

enterprise/coderd/prebuilds/reconcile_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,7 @@ func setupTestDBWorkspace(
10121012
return workspace
10131013
}
10141014

1015+
// nolint:revive // It's a control flag, but this is a test.
10151016
func setupTestDBWorkspaceAgent(t *testing.T, db database.Store, workspaceID uuid.UUID, eligible bool) database.WorkspaceAgent {
10161017
build, err := db.GetLatestWorkspaceBuildByWorkspaceID(t.Context(), workspaceID)
10171018
require.NoError(t, err)

0 commit comments

Comments
 (0)