From 58a8a53f9c7d7f4bb8b2fea8d24c5bfb3a35994d Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:21:11 -0500 Subject: [PATCH 01/45] wip: testing for cdk versions --- .github/workflows/test.yml | 133 +++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3c553fa --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,133 @@ +name: Regression Tests (Python) + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '0 5 * * *' # once daily at 5AM + workflow_dispatch: + inputs: + cdk-version: + description: Upstream aws-cdk version to use in tests + required: false +env: + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + +jobs: + integration-python-test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ['22.x'] + python-version: ['3.12'] + region: ['us-east-1'] + cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0"]') }} + fail-fast: true + + env: + AWS_REGION: ${{ matrix.region }} + AWS_DEFAULT_REGION: ${{ matrix.region }} + + steps: + - uses: actions/checkout@v2 + with: + path: repo + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python-version }}' + + - name: Install dependencies for aws-cdk-local + working-directory: repo + run: | + npm install + echo "$(pwd)/bin" >> $GITHUB_PATH + + - name: Install specific aws-cdk version + working-directory: repo + run: | + if [ -n "${{ matrix.cdk-version }}" ]; then + npm install aws-cdk@${{ matrix.cdk-version }} + else + npm install aws-cdk + fi + + - name: Verify specific aws-cdk version is used by cdklocal + run: | + if [ -n "${{ matrix.cdk-version }}" ]; then + [[ $(cdklocal --version) =~ ^${{ matrix.cdk-version }}.* ]] || exit 1 + else + echo "Latest version installed, skipping version verification." + fi + + - name: Install AWS CLI + run: pip install awscli + + - name: Install localstack CLI + run: pip install localstack + + - name: Start and wait for localstack (Community) + timeout-minutes: 10 + run: | + # Check if the localstack-main container is already running + if ! docker ps --filter "name=localstack-main" --filter "status=running" -q; then + echo "LocalStack container is not running. Starting LocalStack..." + docker pull localstack/localstack:latest + localstack start -d + localstack wait -t 30 + else + echo "LocalStack container is already running. Skipping start." + fi + + - name: Set up unique folder + run: | + export WORK_DIR="cdk-test-$GITHUB_RUN_NUMBER" + export STACK_NAME="CdkTest${GITHUB_RUN_NUMBER}Stack" + mkdir -p $WORK_DIR + echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV + echo "STACK_NAME=$STACK_NAME" >> $GITHUB_ENV + + - name: Initialize new CDK app + run: | + cd $WORK_DIR + cdklocal init app --language=python + + - name: Install python libs + run: | + cd $WORK_DIR + source .venv/bin/activate + pip install -r requirements.txt + + - name: Run bootstrap + timeout-minutes: 1 + run: | + cd $WORK_DIR + source .venv/bin/activate + cdklocal bootstrap + + - name: Deploy + timeout-minutes: 1 + run: | + cd $WORK_DIR + source .venv/bin/activate + cdklocal deploy --require-approval=never + + - name: Clean up + if: always() + run: rm -rf $WORK_DIR + + - name: Verify successful deployment + run: | + [ $(aws cloudformation describe-stacks --stack-name $STACK_NAME --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 From d7423b1eceb5127f201490a065e1e25a6c09353b Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:25:27 -0500 Subject: [PATCH 02/45] change job name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c553fa..809b360 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ env: AWS_SECRET_ACCESS_KEY: test jobs: - integration-python-test: + dynamic-cdk-version-testing: runs-on: ubuntu-latest strategy: From 27f4b4bf0bd64ecec0699bc3802ec39393554118 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:26:10 -0500 Subject: [PATCH 03/45] change job name title --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 809b360..562f207 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Regression Tests (Python) +name: Dynamic CDK version testing on: push: From 84b8829394172d49fd36df5ef4a0fe533a0eee16 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:28:04 -0500 Subject: [PATCH 04/45] disable fast fail and add latest version --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 562f207..d193375 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,8 +27,8 @@ jobs: node-version: ['22.x'] python-version: ['3.12'] region: ['us-east-1'] - cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0"]') }} - fail-fast: true + cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0", ""]') }} + fail-fast: false env: AWS_REGION: ${{ matrix.region }} From 28729b77333ac2751f941aece204a55c5d3a1860 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:32:05 -0500 Subject: [PATCH 05/45] use fake credentials --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d193375..1010f8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,8 @@ on: description: Upstream aws-cdk version to use in tests required: false env: - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test + AWS_ACCESS_KEY_ID: LSIA2KBGMF64YRBX5E0I + AWS_SECRET_ACCESS_KEY: ZgF037sgehvieyj4mejFnipU2HvvwnYQlBsguzLK jobs: dynamic-cdk-version-testing: From 278ff0c5b3585972813433832d545cb8f56f023d Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:34:35 -0500 Subject: [PATCH 06/45] set path after aws-cdk installation --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1010f8c..51f2f5a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,6 @@ jobs: working-directory: repo run: | npm install - echo "$(pwd)/bin" >> $GITHUB_PATH - name: Install specific aws-cdk version working-directory: repo @@ -63,6 +62,7 @@ jobs: else npm install aws-cdk fi + echo "$(pwd)/bin" >> $GITHUB_PATH - name: Verify specific aws-cdk version is used by cdklocal run: | From 8b4672f4c4980513a70d684cc8491f2ba87870f0 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 2 Dec 2024 15:43:57 -0500 Subject: [PATCH 07/45] merge installation --- .github/workflows/test.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51f2f5a..a9698ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,10 +53,6 @@ jobs: working-directory: repo run: | npm install - - - name: Install specific aws-cdk version - working-directory: repo - run: | if [ -n "${{ matrix.cdk-version }}" ]; then npm install aws-cdk@${{ matrix.cdk-version }} else @@ -124,10 +120,6 @@ jobs: source .venv/bin/activate cdklocal deploy --require-approval=never - - name: Clean up - if: always() - run: rm -rf $WORK_DIR - - name: Verify successful deployment run: | [ $(aws cloudformation describe-stacks --stack-name $STACK_NAME --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 From dcbe2d8952541b594d6d095a4066c6085f87e17a Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 10:07:49 -0500 Subject: [PATCH 08/45] test --- .github/workflows/test.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9698ea..9fbc534 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,8 @@ on: description: Upstream aws-cdk version to use in tests required: false env: - AWS_ACCESS_KEY_ID: LSIA2KBGMF64YRBX5E0I - AWS_SECRET_ACCESS_KEY: ZgF037sgehvieyj4mejFnipU2HvvwnYQlBsguzLK + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test jobs: dynamic-cdk-version-testing: @@ -27,7 +27,8 @@ jobs: node-version: ['22.x'] python-version: ['3.12'] region: ['us-east-1'] - cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0", ""]') }} +# cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0", ""]') }} + cdk-version: ${{ fromJson(inputs.cdk-version || '[""]') }} fail-fast: false env: @@ -68,8 +69,13 @@ jobs: echo "Latest version installed, skipping version verification." fi - - name: Install AWS CLI - run: pip install awscli +# - name: Install AWS CLI +# run: | +# pip install awscli +# aws configure set aws_access_key_id "AKIAI44QH8DHBEXAMPLE" --profile default +# aws configure set aws_secret_access_key "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" --profile default +# aws configure set region "us-east-1" --profile default +# aws configure set output "json" --profile default - name: Install localstack CLI run: pip install localstack From e8634bed1b82d31f4a4dc66d3530c27ca78ea4b2 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 10:10:19 -0500 Subject: [PATCH 09/45] test --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9fbc534..00d44dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,9 +14,6 @@ on: cdk-version: description: Upstream aws-cdk version to use in tests required: false -env: - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test jobs: dynamic-cdk-version-testing: @@ -34,6 +31,8 @@ jobs: env: AWS_REGION: ${{ matrix.region }} AWS_DEFAULT_REGION: ${{ matrix.region }} + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test steps: - uses: actions/checkout@v2 From 46f9e4afff5793532f0d90876d7f1a1952b85549 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 10:32:11 -0500 Subject: [PATCH 10/45] test --- .github/workflows/test.yml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00d44dc..8cb9f35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,10 @@ on: description: Upstream aws-cdk version to use in tests required: false +env: + AWS_ACCESS_KEY_ID: test + AWS_SECRET_ACCESS_KEY: test + jobs: dynamic-cdk-version-testing: runs-on: ubuntu-latest @@ -23,16 +27,10 @@ jobs: matrix: node-version: ['22.x'] python-version: ['3.12'] - region: ['us-east-1'] # cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0", ""]') }} cdk-version: ${{ fromJson(inputs.cdk-version || '[""]') }} fail-fast: false - env: - AWS_REGION: ${{ matrix.region }} - AWS_DEFAULT_REGION: ${{ matrix.region }} - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test steps: - uses: actions/checkout@v2 @@ -79,6 +77,19 @@ jobs: - name: Install localstack CLI run: pip install localstack + - name: Set up unique folder + run: | + export WORK_DIR="cdk-test$GITHUB_RUN_NUMBER" + export STACK_NAME="CdkTest${GITHUB_RUN_NUMBER}Stack" + mkdir -p $WORK_DIR + echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV + echo "STACK_NAME=$STACK_NAME" >> $GITHUB_ENV + + - name: Initialize new CDK app + run: | + cd $WORK_DIR + cdklocal init app --language=python + - name: Start and wait for localstack (Community) timeout-minutes: 10 run: | @@ -92,19 +103,6 @@ jobs: echo "LocalStack container is already running. Skipping start." fi - - name: Set up unique folder - run: | - export WORK_DIR="cdk-test-$GITHUB_RUN_NUMBER" - export STACK_NAME="CdkTest${GITHUB_RUN_NUMBER}Stack" - mkdir -p $WORK_DIR - echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV - echo "STACK_NAME=$STACK_NAME" >> $GITHUB_ENV - - - name: Initialize new CDK app - run: | - cd $WORK_DIR - cdklocal init app --language=python - - name: Install python libs run: | cd $WORK_DIR From df76582ca29f013ac8874f9538c9725937166a1e Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 10:39:38 -0500 Subject: [PATCH 11/45] test --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8cb9f35..478ea6e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ on: env: AWS_ACCESS_KEY_ID: test AWS_SECRET_ACCESS_KEY: test + AWS_REGION: us-east-1 + AWS_DEFAULT_REGION: us-east-1 jobs: dynamic-cdk-version-testing: From 4458e85817ca97b598a7de6aa9a87b8ce025be6f Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 11:11:58 -0500 Subject: [PATCH 12/45] test --- .github/workflows/test.yml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 478ea6e..b4027bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,9 +29,8 @@ jobs: matrix: node-version: ['22.x'] python-version: ['3.12'] -# cdk-version: ${{ fromJson(inputs.cdk-version || '[ "2.166.0", "2.167.0", ""]') }} cdk-version: ${{ fromJson(inputs.cdk-version || '[""]') }} - fail-fast: false + fail-fast: False steps: @@ -53,10 +52,9 @@ jobs: working-directory: repo run: | npm install + npm install aws-cdk if [ -n "${{ matrix.cdk-version }}" ]; then npm install aws-cdk@${{ matrix.cdk-version }} - else - npm install aws-cdk fi echo "$(pwd)/bin" >> $GITHUB_PATH @@ -68,29 +66,20 @@ jobs: echo "Latest version installed, skipping version verification." fi -# - name: Install AWS CLI -# run: | -# pip install awscli -# aws configure set aws_access_key_id "AKIAI44QH8DHBEXAMPLE" --profile default -# aws configure set aws_secret_access_key "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" --profile default -# aws configure set region "us-east-1" --profile default -# aws configure set output "json" --profile default - - name: Install localstack CLI run: pip install localstack - name: Set up unique folder run: | - export WORK_DIR="cdk-test$GITHUB_RUN_NUMBER" + export WORK_DIR="cdk-test-$GITHUB_RUN_NUMBER" export STACK_NAME="CdkTest${GITHUB_RUN_NUMBER}Stack" mkdir -p $WORK_DIR echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV echo "STACK_NAME=$STACK_NAME" >> $GITHUB_ENV - name: Initialize new CDK app - run: | - cd $WORK_DIR - cdklocal init app --language=python + working-directory: ${{env.WORK_DIR}} + run: cdklocal init app --language=python - name: Start and wait for localstack (Community) timeout-minutes: 10 @@ -106,25 +95,25 @@ jobs: fi - name: Install python libs + working-directory: ${{env.WORK_DIR}} run: | - cd $WORK_DIR source .venv/bin/activate pip install -r requirements.txt - name: Run bootstrap timeout-minutes: 1 + working-directory: ${{env.WORK_DIR}} run: | - cd $WORK_DIR source .venv/bin/activate cdklocal bootstrap - name: Deploy timeout-minutes: 1 + working-directory: ${{env.WORK_DIR}} run: | - cd $WORK_DIR source .venv/bin/activate cdklocal deploy --require-approval=never - name: Verify successful deployment run: | - [ $(aws cloudformation describe-stacks --stack-name $STACK_NAME --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 + [ $(aws cloudformation describe-stacks --stack-name AppTest --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 From 1483273d3cba5a4b5aed44908a6d71f8c2a01284 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 11:24:16 -0500 Subject: [PATCH 13/45] test --- .github/workflows/test.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4027bb..cd7d2ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: matrix: node-version: ['22.x'] python-version: ['3.12'] - cdk-version: ${{ fromJson(inputs.cdk-version || '[""]') }} + cdk-version: ${{ fromJson(inputs.cdk-version || '["2.166.0","2.167.0", ""]') }} fail-fast: False @@ -84,15 +84,9 @@ jobs: - name: Start and wait for localstack (Community) timeout-minutes: 10 run: | - # Check if the localstack-main container is already running - if ! docker ps --filter "name=localstack-main" --filter "status=running" -q; then - echo "LocalStack container is not running. Starting LocalStack..." - docker pull localstack/localstack:latest - localstack start -d - localstack wait -t 30 - else - echo "LocalStack container is already running. Skipping start." - fi + docker pull localstack/localstack:latest + localstack start -d + localstack wait -t 30 - name: Install python libs working-directory: ${{env.WORK_DIR}} From 932f40a921cd92fb617a4db39dae88154acbda5d Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Tue, 3 Dec 2024 11:27:22 -0500 Subject: [PATCH 14/45] test --- .github/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd7d2ea..29704d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,11 +60,7 @@ jobs: - name: Verify specific aws-cdk version is used by cdklocal run: | - if [ -n "${{ matrix.cdk-version }}" ]; then - [[ $(cdklocal --version) =~ ^${{ matrix.cdk-version }}.* ]] || exit 1 - else - echo "Latest version installed, skipping version verification." - fi + cdklocal --version - name: Install localstack CLI run: pip install localstack @@ -110,4 +106,4 @@ jobs: - name: Verify successful deployment run: | - [ $(aws cloudformation describe-stacks --stack-name AppTest --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 + [ $(aws cloudformation describe-stacks --stack-name $STACK_NAME --endpoint-url http://localhost:4566 | jq '[ .Stacks[] | select(.StackStatus == "CREATE_COMPLETE") ] | length') -eq 1 ] || exit 1 From d19257e70ba6bd8133c2762d5f61eec7e6a77144 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:01:23 -0500 Subject: [PATCH 15/45] matrix generation --- .github/workflows/test.yml | 43 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29704d1..c43a465 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,13 +7,14 @@ on: pull_request: branches: - main - schedule: - - cron: '0 5 * * *' # once daily at 5AM workflow_dispatch: inputs: - cdk-version: - description: Upstream aws-cdk version to use in tests + node-version: required: false + default: '22.x' + python-version: + required: false + default: '3.12' env: AWS_ACCESS_KEY_ID: test @@ -22,31 +23,41 @@ env: AWS_DEFAULT_REGION: us-east-1 jobs: - dynamic-cdk-version-testing: + generate-cdk-version-matrix: runs-on: ubuntu-latest - + outputs: + matrix: ${{ steps.set-matrix.env.MATRIX }} + steps: + - name: Use Node.js ${{ inputs.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node-version }} + - name: Obtain aws-cdk versions + id: set-matrix + run: | + VERSIONS_ARRAY=$(npm show aws-cdk time --json --silent| jq 'del(.created, .modified) | keys' -c) + echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV + + version-testing: + runs-on: ubuntu-latest + needs: generate-cdk-version-matrix strategy: - matrix: - node-version: ['22.x'] - python-version: ['3.12'] - cdk-version: ${{ fromJson(inputs.cdk-version || '["2.166.0","2.167.0", ""]') }} - fail-fast: False - + matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix)}} steps: - uses: actions/checkout@v2 with: path: repo - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ inputs.node-version }} uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ inputs.node-version }} - - name: Setup Python ${{ matrix.python-version }} + - name: Setup Python ${{ inputs.python-version }} uses: actions/setup-python@v2 with: - python-version: '${{ matrix.python-version }}' + python-version: '${{ inputs.python-version }}' - name: Install dependencies for aws-cdk-local working-directory: repo From 1bfd52fb357d1f65b0349550a872ca5e4b89d62b Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:04:30 -0500 Subject: [PATCH 16/45] resource provider --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c43a465..01166fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest needs: generate-cdk-version-matrix strategy: - matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix || "{}")}} steps: - uses: actions/checkout@v2 From 8c9be4d18e31579bf15e5d8fd82138756f98779c Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:06:40 -0500 Subject: [PATCH 17/45] fix empty array --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01166fd..4068de7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest needs: generate-cdk-version-matrix strategy: - matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix || "{}")}} + matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix || '{}')}} steps: - uses: actions/checkout@v2 From d50edd6a4cc5e9d15155004e33011b0a20c8a0ac Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:07:41 -0500 Subject: [PATCH 18/45] add output --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4068de7..656e0c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,7 @@ jobs: run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json --silent| jq 'del(.created, .modified) | keys' -c) echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV + echo $MATRIX version-testing: runs-on: ubuntu-latest From 49d944c75153c298810d36f58975c35ba3ed8ef5 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:12:09 -0500 Subject: [PATCH 19/45] use output --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 656e0c4..f36a3e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: generate-cdk-version-matrix: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.set-matrix.env.MATRIX }} + matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Use Node.js ${{ inputs.node-version }} uses: actions/setup-node@v2 @@ -36,8 +36,9 @@ jobs: id: set-matrix run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json --silent| jq 'del(.created, .modified) | keys' -c) - echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV - echo $MATRIX + echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" + echo "::set-output name=matrix::$MATRIX" + version-testing: runs-on: ubuntu-latest From f401be4f51b5a0876e8d4ebdcb050bfc6cc6df92 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:13:56 -0500 Subject: [PATCH 20/45] use output --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f36a3e6..869a2e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: generate-cdk-version-matrix: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + matrix: ${{ steps.set-matrix.env.MATRIX }} steps: - name: Use Node.js ${{ inputs.node-version }} uses: actions/setup-node@v2 @@ -35,9 +35,8 @@ jobs: - name: Obtain aws-cdk versions id: set-matrix run: | - VERSIONS_ARRAY=$(npm show aws-cdk time --json --silent| jq 'del(.created, .modified) | keys' -c) - echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" - echo "::set-output name=matrix::$MATRIX" + VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) + echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV version-testing: From 8a4319abe8fa7f568e075ad16515202d78218d8a Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:16:25 -0500 Subject: [PATCH 21/45] use output --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 869a2e1..cd19597 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,9 @@ jobs: id: set-matrix run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) + echo $VERSIONS_ARRAY echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV + shell: bash version-testing: From 5c8c32869c691d958276c9120cee3e4a981f0506 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:17:59 -0500 Subject: [PATCH 22/45] use output --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd19597..0843deb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,8 +36,8 @@ jobs: id: set-matrix run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) - echo $VERSIONS_ARRAY - echo "MATRIX={\"cdk-version\":$( echo "$VERSIONS_ARRAY" )}" >> $GITHUB_ENV + echo "MATRIX={\"cdk-version\":$VERSIONS_ARRAY)}" >> $GITHUB_ENV + echo $MATRIX shell: bash From 5ef7e93864b52dd653df0eae6838ec51f1993b87 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:20:11 -0500 Subject: [PATCH 23/45] use output --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0843deb..acdc0f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,9 +36,9 @@ jobs: id: set-matrix run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) - echo "MATRIX={\"cdk-version\":$VERSIONS_ARRAY)}" >> $GITHUB_ENV + MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + echo "MATRIX=$MATRIX" >> $GITHUB_ENV echo $MATRIX - shell: bash version-testing: From 1e63c748930318baa9e473e1e9ce039a6d636572 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:23:05 -0500 Subject: [PATCH 24/45] use output --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acdc0f7..cc37606 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,8 @@ jobs: run: | VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" - echo "MATRIX=$MATRIX" >> $GITHUB_ENV + #echo "MATRIX=$MATRIX" >> $GITHUB_ENV + echo "MATRIX=$MATRIX" | tee -a $GITHUB_ENV echo $MATRIX From 50bf64638cd4129737195dc6cc5f3f73b73db078 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:27:22 -0500 Subject: [PATCH 25/45] use output --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc37606..9ce1861 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,6 @@ jobs: MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" #echo "MATRIX=$MATRIX" >> $GITHUB_ENV echo "MATRIX=$MATRIX" | tee -a $GITHUB_ENV - echo $MATRIX version-testing: From 69ee1e5ad91577e97cf88e8625912166e0e55a67 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:34:20 -0500 Subject: [PATCH 26/45] use output --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ce1861..001906c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: generate-cdk-version-matrix: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.set-matrix.env.MATRIX }} + matrix: ${{ steps.set-matrix.outputs.MATRIX }} steps: - name: Use Node.js ${{ inputs.node-version }} uses: actions/setup-node@v2 @@ -35,10 +35,10 @@ jobs: - name: Obtain aws-cdk versions id: set-matrix run: | - VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) + #VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) + VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq 'sort_by( [ split(".") | .[] | tonumber ] ) | .[-10:]' -c) MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" - #echo "MATRIX=$MATRIX" >> $GITHUB_ENV - echo "MATRIX=$MATRIX" | tee -a $GITHUB_ENV + echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT version-testing: From d4b14541021bfe7266a99c87d6ee2f82b762b035 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:35:28 -0500 Subject: [PATCH 27/45] use output --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 001906c..ae8e2be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,8 +35,7 @@ jobs: - name: Obtain aws-cdk versions id: set-matrix run: | - #VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) - VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq 'sort_by( [ split(".") | .[] | tonumber ] ) | .[-10:]' -c) + VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT From ba8f7f6b00c2b68bd248aa1d4a3caa0bb290dd07 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 4 Dec 2024 21:39:57 -0500 Subject: [PATCH 28/45] use output --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae8e2be..7eee39d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: - name: Obtain aws-cdk versions id: set-matrix run: | - VERSIONS_ARRAY=$(npm show aws-cdk time --json | jq 'del(.created, .modified) | keys' -c) + VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT From a91245e2cc4103c5b5dd19055c307e09e775effc Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 13:55:15 -0500 Subject: [PATCH 29/45] use a preselected versions list by the default --- .github/workflows/test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7eee39d..d663f35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,10 @@ on: python-version: required: false default: '3.12' + run-all-latest-cdk-versions: + required: false + type: boolean + default: false env: AWS_ACCESS_KEY_ID: test @@ -32,12 +36,21 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ inputs.node-version }} - - name: Obtain aws-cdk versions + - name: Obtain all aws-cdk latest versions id: set-matrix + if: ${{ inputs.run-all-latest-cdk-versions == true }} run: | VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT + + - name: Obtain default list of aws-cdk versions + id: set-matrix + if: ${{ inputs.run-all-latest-cdk-versions == false }} + run: | + VERSIONS_ARRAY=["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""] + MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT version-testing: From 69e6c88a49683000f8b08652292a2d6b136d79dc Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:01:55 -0500 Subject: [PATCH 30/45] fix --- .github/workflows/test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d663f35..b852990 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,19 +37,22 @@ jobs: with: node-version: ${{ inputs.node-version }} - name: Obtain all aws-cdk latest versions - id: set-matrix + id: heavy-matrix if: ${{ inputs.run-all-latest-cdk-versions == true }} run: | VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) - MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" - echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT + export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" - name: Obtain default list of aws-cdk versions - id: set-matrix + id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | VERSIONS_ARRAY=["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""] - MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + + - name: Generate matrix + id: simple-matrix + run: | echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT From d80800eb7f1dca770bd322d72d6bd9091626234d Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:02:34 -0500 Subject: [PATCH 31/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b852990..43404ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" - name: Generate matrix - id: simple-matrix + id: set-matrix run: | echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT From e66c58838b86c9986de470febc8fe3cfa45fe788 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:09:31 -0500 Subject: [PATCH 32/45] fix --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43404ac..10e30c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,19 +40,18 @@ jobs: id: heavy-matrix if: ${{ inputs.run-all-latest-cdk-versions == true }} run: | - VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) - export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + export VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) - name: Obtain default list of aws-cdk versions id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - VERSIONS_ARRAY=["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""] - export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" + export VERSIONS_ARRAY=["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""] - name: Generate matrix id: set-matrix run: | + export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT From 40f6ef962fca4f7b54150cf609e7a8e4c987c495 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:10:32 -0500 Subject: [PATCH 33/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10e30c3..0e08e03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - export VERSIONS_ARRAY=["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""] + export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' - name: Generate matrix id: set-matrix From edf769be9f3f9c7e9e13a79e69fedbfce0b96773 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:13:06 -0500 Subject: [PATCH 34/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e08e03..0e6b7d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' + export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", "latest"]' - name: Generate matrix id: set-matrix From 64c2c50e208b3418f3357a499966f4dbac68c0b8 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:15:44 -0500 Subject: [PATCH 35/45] fix --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e6b7d5..ac5b206 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,12 +41,15 @@ jobs: if: ${{ inputs.run-all-latest-cdk-versions == true }} run: | export VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) + echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV - name: Obtain default list of aws-cdk versions id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", "latest"]' + echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV + - name: Generate matrix id: set-matrix @@ -59,7 +62,7 @@ jobs: runs-on: ubuntu-latest needs: generate-cdk-version-matrix strategy: - matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix || '{}')}} + matrix: ${{fromJson(needs.generate-cdk-version-matrix.outputs.matrix)}} steps: - uses: actions/checkout@v2 From 32d026cff56d08b8e68e0551e978350e43af4516 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Mon, 16 Dec 2024 14:17:18 -0500 Subject: [PATCH 36/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac5b206..51ccd46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", "latest"]' + export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV From 602fe3c0315f1189357e39622cce99010959fe16 Mon Sep 17 00:00:00 2001 From: Dominik Schubert Date: Wed, 18 Dec 2024 09:45:55 +0100 Subject: [PATCH 37/45] remove older v1 versions --- .github/workflows/test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51ccd46..1bff5bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,10 @@ on: inputs: node-version: required: false - default: '22.x' + default: "22.x" python-version: required: false - default: '3.12' + default: "3.12" run-all-latest-cdk-versions: required: false type: boolean @@ -42,22 +42,20 @@ jobs: run: | export VERSIONS_ARRAY=$(npm view aws-cdk versions --json | jq -c '.[-256:]' ) echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV - + - name: Obtain default list of aws-cdk versions id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - export VERSIONS_ARRAY='["1.10.0", "1.38.0", "1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' + export VERSIONS_ARRAY='["1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV - - name: Generate matrix id: set-matrix run: | export MATRIX="{\"cdk-version\":$VERSIONS_ARRAY}" echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT - - + version-testing: runs-on: ubuntu-latest needs: generate-cdk-version-matrix @@ -77,7 +75,7 @@ jobs: - name: Setup Python ${{ inputs.python-version }} uses: actions/setup-python@v2 with: - python-version: '${{ inputs.python-version }}' + python-version: "${{ inputs.python-version }}" - name: Install dependencies for aws-cdk-local working-directory: repo From 81a138806531143e75ffc7cfb157bfb2413f04cf Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:18:38 -0500 Subject: [PATCH 38/45] add acknowledgement --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bff5bb..a222129 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,6 +124,7 @@ jobs: working-directory: ${{env.WORK_DIR}} run: | source .venv/bin/activate + cdklocal acknowledge 19836 cdklocal bootstrap - name: Deploy From 2896a69f5dcdbb89d48fcde6872c3f1f0a7b3418 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:25:21 -0500 Subject: [PATCH 39/45] only npm install once --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a222129..8e51e65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,9 +81,10 @@ jobs: working-directory: repo run: | npm install - npm install aws-cdk if [ -n "${{ matrix.cdk-version }}" ]; then npm install aws-cdk@${{ matrix.cdk-version }} + else + npm install aws-cdk fi echo "$(pwd)/bin" >> $GITHUB_PATH From 6fd0283d3bc73fb148131cafc3076169a26cb577 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:36:42 -0500 Subject: [PATCH 40/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e51e65..b388e58 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,7 @@ jobs: working-directory: ${{env.WORK_DIR}} run: | source .venv/bin/activate - cdklocal acknowledge 19836 + cdk acknowledge 19836 cdklocal bootstrap - name: Deploy From 3d0d58635e3d53c9b84773ce8db7fbe5c6f60b4a Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:46:17 -0500 Subject: [PATCH 41/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b388e58..8e51e65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,7 @@ jobs: working-directory: ${{env.WORK_DIR}} run: | source .venv/bin/activate - cdk acknowledge 19836 + cdklocal acknowledge 19836 cdklocal bootstrap - name: Deploy From ee96c04e7f732c387e9ee6c5163e68ea5ecf0787 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:48:51 -0500 Subject: [PATCH 42/45] fix --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e51e65..3f02c87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,6 @@ jobs: working-directory: ${{env.WORK_DIR}} run: | source .venv/bin/activate - cdklocal acknowledge 19836 cdklocal bootstrap - name: Deploy From 7ebccfd4c24ef45dc9614bee6e06bc764bc89626 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:54:02 -0500 Subject: [PATCH 43/45] fix --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f02c87..649461f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,6 +125,9 @@ jobs: working-directory: ${{env.WORK_DIR}} run: | source .venv/bin/activate + if [ "${{ matrix.cdk-version }}" = "1.150.0" ]; then + cdk acknowledge 19836 + fi cdklocal bootstrap - name: Deploy From 6a985408417ea511f5a64c7cddad699c3c61a84d Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Wed, 18 Dec 2024 14:56:42 -0500 Subject: [PATCH 44/45] fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 649461f..631f099 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,7 +126,7 @@ jobs: run: | source .venv/bin/activate if [ "${{ matrix.cdk-version }}" = "1.150.0" ]; then - cdk acknowledge 19836 + cdklocal acknowledge 19836 fi cdklocal bootstrap From 4dc26a6f8b34320ebe90d39fdb68d02bf0b07fee Mon Sep 17 00:00:00 2001 From: Dominik Schubert Date: Fri, 20 Dec 2024 16:20:54 +0100 Subject: [PATCH 45/45] remove all v1 versions for now --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 631f099..08a9942 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: id: simple-matrix if: ${{ inputs.run-all-latest-cdk-versions == false }} run: | - export VERSIONS_ARRAY='["1.95.1", "1.150.0", "2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' + export VERSIONS_ARRAY='["2.30.0", "2.50.0", "2.75.0", "2.120.0", "2.166.0", "2.167.0", ""]' echo "VERSIONS_ARRAY=$VERSIONS_ARRAY" >> $GITHUB_ENV - name: Generate matrix