diff --git a/sdk/buildstep/ask_test.go b/sdk/buildstep/ask_test.go index 9df19195..876908d9 100644 --- a/sdk/buildstep/ask_test.go +++ b/sdk/buildstep/ask_test.go @@ -317,20 +317,22 @@ func TestPauseCapacityAndComposerKey(t *testing.T) { // Issue 1748 (ADR 0664): a transport fault is told from a wrong source by its words; a step given again is no end; the // bus waits 1 minute after the first run and 4 after the second. for words, want := range map[string]bool{ - `Get "https://proxy": dial tcp: lookup proxy.golang.org: i/o timeout`: true, - `Head http://store.internal:5100/v2/x: dial tcp 10.10.0.1:5100: i/o timeout`: true, - "kex_exchange_identification: read: Connection reset by peer": true, - "Connection closed by 10.10.0.1 port 222": true, - "npm error code EAI_AGAIN": true, - "npm error code ETIMEDOUT": true, - "npm error code ECONNRESET": true, - "fatal: unable to access the forge: Could not resolve host: mesh-forge": true, - "Get \"https://example.com/x.tar.gz\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)": true, - (&HolderSilent{Seat: "go-package-registry", Holder: "gopkgs", Node: "ace"}).Error(): true, - "nats: no responders available for request": false, - "fatal: unknown revision or path not in the working tree": false, - "verifying module: checksum mismatch": false, - "./main.go:3:1: syntax error: unexpected }": false, + `Get "https://proxy": dial tcp: lookup proxy.golang.org: i/o timeout`: true, + `Head http://store.internal:5100/v2/x: dial tcp 10.10.0.1:5100: i/o timeout`: true, + "kex_exchange_identification: read: Connection reset by peer": true, + "Connection closed by 10.10.0.1 port 222": true, + "npm error code EAI_AGAIN": true, + "npm error code ETIMEDOUT": true, + "npm error code ECONNRESET": true, + "fatal: unable to access the forge: Could not resolve host: mesh-forge": true, + "Get \"https://example.com/x.tar.gz\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)": true, + (&HolderSilent{Seat: "go-package-registry", Holder: "gopkgs", Node: "ace"}).Error(): true, + `invalid version: Get "https://proxy.golang.org/x/@v/y.info": dial tcp [2a00::1]:443: connect: network is unreachable`: true, + "dial tcp 10.10.0.1:22: connect: No route to host": true, + "nats: no responders available for request": false, + "fatal: unknown revision or path not in the working tree": false, + "verifying module: checksum mismatch": false, + "./main.go:3:1: syntax error: unexpected }": false, } { if PassingCause(words) != want { t.Errorf("PassingCause(%q) = %v, want %v", words, !want, want) diff --git a/sdk/buildstep/passing.go b/sdk/buildstep/passing.go index de3b382e..6c87182e 100644 --- a/sdk/buildstep/passing.go +++ b/sdk/buildstep/passing.go @@ -40,7 +40,7 @@ func (h *HolderSilent) Unwrap() error { return &Passing{Err: errors.New(h.Error( // reset connection, ssh's key exchange cut by a forge's per-source penalty) and npm's error codes. "no responders" alone is not // one: it is the same for a seat nothing holds (HolderSilent is the case a holder is named). var passingWords = []string{"i/o timeout", "no such host", "temporary failure in name resolution", "connection refused", - "connection reset", "tls handshake timeout", "lookup ", "kex_exchange_identification", "connection closed by", + "connection reset", "tls handshake timeout", "network is unreachable", "no route to host", "lookup ", "kex_exchange_identification", "connection closed by", "could not resolve host", "client.timeout", "operation timed out", "connection timed out", "eai_again", "etimedout", "econnreset", "econnrefused", "enotfound", strings.ToLower(HolderSilentWords)} // PassingCause says words (a tool's output or a step's reason) are those of a transport fault.