-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
CI Run: https://github.com/coder/coder/actions/runs/22642087754
Job: test-go-race-pg
Commit: f6b4b7edaba93446f62567a995daba7255dac51e (Steven Masley)
Failure:
workspaces_test.go:3026:
Error: Expected value not to be nil.
Messages: metric "coderd_workspace_creation_duration_seconds" with labels map[organization_name:coder preset_name:preset-test template_name:homeless-vega200 type:prebuild] not found
Notable timing in logs (metric update occurs after the assertion):
21:30:49.915 ... TestWorkspaceProvisionerdServerMetrics ... metric "coderd_workspace_creation_duration_seconds" ... not found
21:30:49.916 ... provisionerd_server_metrics: update workspace timings metrics organization_name=coder template_name=homeless-vega200 preset_name=preset-test is_prebuild=true is_claim=false is_workspace_first_build=true
Extra noise (likely unrelated):
dump on failure: failed to run pg_dump ... server version: 17.5 ... pg_dump version: 14.20 ... aborting because of server version mismatch
Root cause hypothesis:
Flaky timing: the prebuild reconciliation/build completes, but the Prometheus histogram update is asynchronous and can occur after the test checks promhelp.HistogramValue, so the metric is temporarily missing. The log shows the metrics update right after the assertion failure.
Data race / panic / OOM checks:
- No "WARNING: DATA RACE" or "race detected" found in the job logs
- No panic/OOM indicators found
Assignment analysis:
- Git blame not available in tooling.
- Workspace timing metrics are implemented in
coderd/provisionerdserver/metrics.go. - Most recent meaningful change to that file is commit 5f3be6 (Callum Styan). Earlier prebuild timing metrics/tests were introduced by Susana Ferreira (commit 0ab345).
- Assigning to @cstyan for triage based on recent ownership of the metrics implementation.
Related issues searched:
- TestWorkspaceProvisionerdServerMetrics
- coderd_workspace_creation_duration_seconds
- "workspace creation duration" + prebuild
No duplicates found.
Repro (likely):
go test ./enterprise/coderd -run TestWorkspaceProvisionerdServerMetrics -race
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels