Skip to content

Commit 85354f6

Browse files
authored
chore(cli): update the gopkg error pattern in integ tests (#23170)
Another error message found in the wild: ``` go: github.com/aws/[email protected] requires gopkg.in/[email protected]: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/0901dc1ef67fcce1c9b3ae51078740de4a0e2dc673e720584ac302973af82f36: exit status 128: error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: the remote end hung up unexpectedly ``` ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 2506a01 commit 85354f6

File tree

1 file changed

+6
-1
lines changed
  • packages/aws-cdk/test/integ/helpers

1 file changed

+6
-1
lines changed

packages/aws-cdk/test/integ/helpers/sam.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,13 @@ function errorCausedByGoPkg(error: string) {
103103
// gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776: unrecognized import path "gopkg.in/yaml.v3": reading https://gopkg.in/yaml.v3?go-get=1: 502 Bad Gateway
104104
// server response: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
105105
////////////////////////////////////////////////////////////////////
106+
// go: github.com/aws/[email protected] requires
107+
// gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/0901dc1ef67fcce1c9b3ae51078740de4a0e2dc673e720584ac302973af82f36: exit status 128:
108+
// error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
109+
// fatal: the remote end hung up unexpectedly
110+
////////////////////////////////////////////////////////////////////
106111

107-
return (error.includes('unable to access \'https://gopkg.in/')
112+
return (error.includes('gopkg\.in.*invalid version.*exit status 128')
108113
|| error.match(/unrecognized import path[^\n]gopkg\.in/));
109114
}
110115

0 commit comments

Comments
 (0)