Skip to content

fix: reduce excessive logging when database is unreachable #17363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 15, 2025
Prev Previous commit
Next Next commit
Add len checks for returned resources
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
  • Loading branch information
dannykopping committed Apr 11, 2025
commit 0136b70667cd2cf70c58347b18ab8ae7438928b3
2 changes: 2 additions & 0 deletions coderd/workspaceagents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ func TestWorkspaceAgentDialFailure(t *testing.T) {
}).WithAgent().Do()
_ = agenttest.New(t, client.URL, r.AgentToken)
resources := coderdtest.AwaitWorkspaceAgents(t, client, r.Workspace.ID)
require.Len(t, resources, 1)
require.Len(t, resources[0].Agents, 1)

// When: the db is marked as unhealthy (i.e. will fail its Ping).
// This needs to be done *after* the server "starts" otherwise it'll fail straight away when trying to initialize.
Expand Down
Loading