Skip to content

test: fix flake in TestAgent_Metrics_SSH#20450

Merged
ethanndickson merged 1 commit into
mainfrom
ethan/agent-metrics-flake
Oct 24, 2025
Merged

test: fix flake in TestAgent_Metrics_SSH#20450
ethanndickson merged 1 commit into
mainfrom
ethan/agent-metrics-flake

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Oct 24, 2025

Copy link
Copy Markdown
Member

Second flake for this test today 😮‍💨.

Flake seen here, though I couldn't replicate this locally, some CI exclusive networking issue.
https://github.com/coder/coder/actions/runs/18770305895/job/53553517887?pr=20448

    agent_test.go:3619: 
        	Error Trace:	/home/runner/work/coder/coder/agent/agent_test.go:3619
        	Error:      	Received unexpected error:
        	            	expected 1, got 0.000000:
        	            	    github.com/coder/coder/v2/agent_test.TestAgent_Metrics_SSH.func7
        	            	        /home/runner/work/coder/coder/agent/agent_test.go:3557
        	Test:       	TestAgent_Metrics_SSH
        	Messages:   	check fn for coderd_agentstats_currently_reachable_peers failed

This value is incremented by a successful ping to the peer from the agent, which is dependent on all the networking code, which I think is definitely out of scope of this test for agent metrics. So, we'll just assert that the metrics exist with the correct labels (derp, p2p)

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson marked this pull request as ready for review October 24, 2025 06:16
@ethanndickson ethanndickson merged commit 33b42fc into main Oct 24, 2025
36 checks passed
@ethanndickson ethanndickson deleted the ethan/agent-metrics-flake branch October 24, 2025 06:28
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants