Skip to content

fix(probelink): say how long a dial waited and name the dial-timeout setting - #663

Open
jay23606 wants to merge 1 commit into
AlphaWaveSystems:mainfrom
jay23606:pr-go/408-dial-timeout-error-should-say-how-long-i
Open

jay23606 wants to merge 1 commit into
AlphaWaveSystems:mainfrom
jay23606:pr-go/408-dial-timeout-error-should-say-how-long-i

Conversation

@jay23606

Copy link
Copy Markdown

The bug

When the CLI cannot reach the agent in time, the dial error did not say how long it waited or which setting raises the wait. On a loaded host the agent can take longer than the default 30s to start listening after a fresh install, and the failure then read as a bare unexpected EOF or i/o timeout, which looks like a protocol fault.

The change

  • When a dial gives up, the error now says gave up after <wait> waiting for the agent; raise the wait with --dial-timeout or agent.dial_timeout in probe.yaml (default 30s), whatever the last error was.
  • The refused-connection hint no longer repeats the wait; it says it once, in the give-up text.
  • The default (30s) and the retry logic are unchanged.
  • CHANGELOG entry under Fixed.

How it was tested

  • go test ./internal/probelink -run "TestDialGiveUpErrorNamesWaitAndSetting|TestDialGiveUpHintAfterEOFAndStall" -count=1 -v passes. The first covers a refused connection and checks the wait is named once; the second covers an agent port that closes immediately (unexpected EOF) and one that accepts and never answers.
  • go vet ./internal/probelink and go test ./internal/probelink -count=1 pass.
  • go test ./internal/probelink -run TestDialGiveUpErrorNamesWaitAndSetting -count=1 -v fails on the base client.go with the new test file, and passes with the fix.

Regression test: fails on base twice (/error should name the dial timeout setting/), passes on fix twice (go test ./internal/probelink -run TestDialGiveUpErrorNamesWaitAndSetting -count=1 -v)

Fixes #408

@jay23606
jay23606 requested a review from a team as a code owner November 16, 2026 06:25
@pbertsch

Copy link
Copy Markdown
Member

Thank you for this. The change reads well and the new tests pass when merged with current main. Two things are needed before it can merge: please rebase on main (the CHANGELOG conflicts; keep both entries) and complete the CLA check, which is failing, following its instructions. Once both are done we will merge it.

Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
@jay23606
jay23606 force-pushed the pr-go/408-dial-timeout-error-should-say-how-long-i branch from 9d68811 to 2079f36 Compare November 17, 2026 19:31
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dial timeout error should say how long it waited and name the timeout setting

2 participants