Add staged connection diagnosis for opaque dial failures#1114
Draft
rossnelson wants to merge 6 commits into
Draft
Add staged connection diagnosis for opaque dial failures#1114rossnelson wants to merge 6 commits into
rossnelson wants to merge 6 commits into
Conversation
Covers classifyGRPCError, connectSummary's grep-compatibility contract, and an end-to-end case where the failing address comes from a config profile (exercising the new cliext builder metadata).
- errors.Is(err, syscall.ECONNREFUSED) doesn't match Windows' WSAECONNREFUSED; fall back to matching the error message. - The plaintext test server closed with the client's ClientHello unread, sending an RST that on Windows discards the buffered HTTP response before the probe reads it; drain before closing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Related to #224 and #851.
What changed?
This PR turns opaque connection failures into bounded, evidence-based guidance so that users can act on a real cause.
Before this change, a failed server connection could end as an opaque dial error. After the real failure, the CLI performs bounded DNS, TCP, and TLS checks. It offers advice only when the evidence supports it. A generic TLS handshake failure is not proof of mTLS, so it produces no certificate advice. Diagnosis stops after three seconds or when the command is canceled. Set
TEMPORAL_CLI_DISABLE_CONNECT_DIAGNOSISto disable it.Generated command
RunEfunctions return wrapped errors. A single parent terminal writer sends built-in failures to stderr. Concrete adapters handle connection errors and standalone ActivityNotFounderrors. Extensions keep their own streams and exit status.Checklist
Stability
-o json/-o jsonl) are treated as breaking changesDesign
temporal <noun> <verb>structure (e.g.temporal workflow start)--search-attribute, bad:--index-field)(Experimental)incommands.yamlHelp text (see style guide at the top of
commands.yaml)--namespace, not-n), one flag per lineYourXxxform (YourWorkflowId,YourNamespace)Behavior
Tests
SharedServerSuite)func TestXxx) where applicableManual tests
Setup
No manual setup was used.
Happy path
No manual happy-path run was used. The full test suite passed:
Error case
Focused
go test -raceterminal and output tests passed. The full race suite was not run.Composition
No manual composition test was used.
What to look at first