Add staged connection diagnosis for opaque dial failures#1114
Draft
rossnelson wants to merge 5 commits into
Draft
Add staged connection diagnosis for opaque dial failures#1114rossnelson wants to merge 5 commits into
rossnelson wants to merge 5 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?
TL;DR: This PR diagnoses opaque Temporal server dial failures in stages. Users see where a connection failed and get a concrete next step without changing the original command error.
After a dial fails, the CLI probes DNS, TCP, and TLS. These probes use the remaining command context with a separate three-second cap.
TEMPORAL_CLI_DISABLE_CONNECT_DIAGNOSISdisables them.The diagnostic error carries allowlisted semantic facts instead of raw arguments or construction-time color state. It preserves native errors through unwrapping.
A single parent terminal boundary builds controlled reports and exact-redacts secret values known to the runtime. It performs one checked stderr write. Existing stdout, exit-status, and extension ownership remain intact.
Suggested commands use long flags with POSIX or PowerShell-safe quoting. Standalone Activity
NotFoundhandling provides a second validation slice.This PR is a reference transition slice, not the completed project standard. The structured error handling guide separates the durable direction from compatibility mechanisms retained on this branch.
Durable practices demonstrated here:
Compatibility mechanisms that future families must not copy:
Failrecordercolor.NoColormutation and single-flightExecuteBroader family adoption remains blocked on gates A-C in the guide. Declaring this the project standard remains blocked on gates D-E. The scope stays internal and does not add a JSON error schema, public status taxonomy, public
cliextprovenance, or provider interface.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
Not rerun manually. Fresh automated verification passed:
The root command does not enter the nested
cliextmodule.Error case
Not rerun manually. The race suite exposes the documented concurrent
color.NoColorrace:This suite is expected to remain red until Phase C makes color command-local. It becomes a required green gate in Phase C.
The standalone
cliextcompile mismatch predates this branch. Until fixed,(cd cliext && go test ./...)must match the recorded baseline exception and must not be reported as green.Composition
Not rerun manually.
What to look at first