googleapis / google-auth-library-nodejs

🔑 Google Auth Library for Node.js
Apache License 2.0
1.71k stars 374 forks source link

samples for external-account: should acquire ADC for AWS creds failed #1780

Closed flaky-bot[bot] closed 5 months ago

flaky-bot[bot] commented 6 months ago

Note: #1729 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: fc8dfe9d373e30dd1bd06eb8cbb8b52e735b4d83 buildURL: Build Status, Sponge status: failed

flaky-bot[bot] commented 6 months ago

Looks like this issue is flaky. :worried:

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (fc8dfe9d373e30dd1bd06eb8cbb8b52e735b4d83), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

danielbankhead commented 6 months ago

Extracted error:

<testcase classname="samples for external-account" name="should acquire ADC for AWS creds" time="0.277">
<failure>GaxiosError: Invalid response body while trying to fetch https://sts.googleapis.com/v1/token: read ECONNRESET at Gaxios._request (/workspace/node_modules/gaxios/build/src/gaxios.js:149:19) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async StsCredentials.exchangeToken (/workspace/build/src/auth/stscredentials.js:90:30) at async AwsClient.refreshAccessTokenAsync (/workspace/build/src/auth/baseexternalclient.js:315:29) at async AwsClient.getAccessToken (/workspace/build/src/auth/baseexternalclient.js:165:13) at async AwsClient.getRequestHeaders (/workspace/build/src/auth/baseexternalclient.js:182:37) at async AwsClient.requestAsync (/workspace/build/src/auth/baseexternalclient.js:242:36) at async main (/workspace/samples/adc.js:31:15) { config: { url: 'https://sts.googleapis.com/v1/token', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'x-goog-api-client': 'gl-node/14.21.3 auth/9.7.0 google-byoid-sdk source/aws sa-impersonation/true config-lifetime/false', 'User-Agent': 'google-api-nodejs-client/9.7.0', Accept: 'application/json' }, data: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.', responseType: 'json', paramsSerializer: [Function: paramsSerializer], body: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.', validateStatus: [Function: validateStatus], errorRedactor: [Function: defaultErrorRedactor] }, response: undefined, error: FetchError: Invalid response body while trying to fetch https://sts.googleapis.com/v1/token: read ECONNRESET at Gunzip.<anonymous> (/workspace/node_modules/node-fetch/lib/index.js:400:12) at Gunzip.emit (events.js:412:35) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' }, code: 'ECONNRESET', [Symbol(gaxios-gaxios-error)]: '6.3.0' } : expected 'GaxiosError: Invalid response body wh…' to match /DNS Info:/ AssertionError: GaxiosError: Invalid response body while trying to fetch https://sts.googleapis.com/v1/token: read ECONNRESET at Gaxios._request (/workspace/node_modules/gaxios/build/src/gaxios.js:149:19) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async StsCredentials.exchangeToken (/workspace/build/src/auth/stscredentials.js:90:30) at async AwsClient.refreshAccessTokenAsync (/workspace/build/src/auth/baseexternalclient.js:315:29) at async AwsClient.getAccessToken (/workspace/build/src/auth/baseexternalclient.js:165:13) at async AwsClient.getRequestHeaders (/workspace/build/src/auth/baseexternalclient.js:182:37) at async AwsClient.requestAsync (/workspace/build/src/auth/baseexternalclient.js:242:36) at async main (/workspace/samples/adc.js:31:15) { config: { url: 'https://sts.googleapis.com/v1/token', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'x-goog-api-client': 'gl-node/14.21.3 auth/9.7.0 google-byoid-sdk source/aws sa-impersonation/true config-lifetime/false', 'User-Agent': 'google-api-nodejs-client/9.7.0', Accept: 'application/json' }, data: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.', responseType: 'json', paramsSerializer: [Function: paramsSerializer], body: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.', validateStatus: [Function: validateStatus], errorRedactor: [Function: defaultErrorRedactor] }, response: undefined, error: FetchError: Invalid response body while trying to fetch https://sts.googleapis.com/v1/token: read ECONNRESET at Gunzip.<anonymous> (/workspace/node_modules/node-fetch/lib/index.js:400:12) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' }, code: 'ECONNRESET', [Symbol(gaxios-gaxios-error)]: '6.3.0' } : expected 'GaxiosError: Invalid response body wh…' to match /DNS Info:/ at Context.<anonymous> (test/externalclient.test.js:430:12) at processTicksAndRejections (internal/process/task_queues.js:95:5)</failure>
</testcase>