File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 11name : Builds
22description : Builds the repository and assumes the AWS IAM role for testing
3+ inputs :
4+ aws-region :
5+ description : Region where the credentials will be assumed
6+ required : false
7+ default : us-east-1
38runs :
49 using : composite
510 steps :
2429 uses : aws-actions/configure-aws-credentials@v4
2530 with :
2631 role-to-assume : ${{ steps.role-to-assume.outputs.arn }}
27- aws-region : us-east-1
32+ aws-region : ${{ inputs.aws-region }}
Original file line number Diff line number Diff line change @@ -132,3 +132,20 @@ jobs:
132132 secret-ids : JsonSecret
133133 - name : Assert Default Is No Json Secrets
134134 run : npm run integration-test __integration_tests__/parse_json_secrets.test.ts
135+
136+ af-south-1-integration-test :
137+ runs-on : ubuntu-latest
138+ needs : unit-tests
139+ steps :
140+ - name : Checkout
141+ uses : actions/checkout@v4
142+ - name : Build
143+ uses : ./.github/actions/build
144+ with :
145+ aws-region : af-south-1
146+ - name : Act
147+ uses : ./
148+ with :
149+ secret-ids : JsonSecret
150+ - name : Assert
151+ run : npm run integration-test __integration_tests__/parse_json_secrets.test.ts
Original file line number Diff line number Diff line change 1- import * as core from '@actions/core'
1+ import * as core from '@actions/core' ;
2+ import { setDefaultAutoSelectFamilyAttemptTimeout } from 'net' ;
23import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager" ;
34import {
45 buildSecretsList ,
@@ -13,6 +14,13 @@ import { CLEANUP_NAME } from "./constants";
1314
1415export async function run ( ) : Promise < void > {
1516 try {
17+ // Node 20 introduced automatic family selection for dual-stack endpoints. When the runner
18+ // sits far away from the secrets manager endpoint it sometimes timeouts on negotiation between
19+ // A and AAAA records. This behaviour was described in the https://github.com/nodejs/node/issues/54359
20+ // The default value is 250ms, increasing to 1s. The integration tests stops beeing flaky with this
21+ // value.
22+ setDefaultAutoSelectFamilyAttemptTimeout ( 1000 ) ;
23+
1624 // Default client region is set by configure-aws-credentials
1725 const client : SecretsManagerClient = new SecretsManagerClient ( { region : process . env . AWS_DEFAULT_REGION , customUserAgent : "github-action" } ) ;
1826 const secretConfigInputs : string [ ] = [ ...new Set ( core . getMultilineInput ( 'secret-ids' ) ) ] ;
You can’t perform that action at this time.
0 commit comments