From f56c12f5219b8cd07569103166ee810d0aad17d9 Mon Sep 17 00:00:00 2001 From: Slesa Adhikari Date: Thu, 23 Jul 2026 15:00:34 -0500 Subject: [PATCH 1/2] Update GitHub Actions to Node 24 majors and Python 3.9 The runners dropped Python 3.8, so the lint workflow failed with "Version 3.8 with arch x64 not found", and the older action majors run on the now-deprecated Node 20. - lint.yml: setup-python@v1 (3.8) -> @v6 (3.9), matching the Lambda runtime and the deploy workflows; checkout@v2 -> @v5; wearerequired/lint-action@v1 -> @v2. - deploy.yml / update_pyquarc.yml: checkout@v2 -> @v5, configure-aws-credentials@v1 -> @v4, setup-python@v2 -> @v6. - deploy.yml: setup-node@v2 -> @v5 and bump the CDK build Node from the EOL 14.15.1 to 20 LTS. --- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/lint.yml | 8 ++++---- .github/workflows/update_pyquarc.yml | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ab0bf17..80c466c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Set environment based on branch run: | @@ -24,14 +24,14 @@ jobs: fi - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.9 @@ -41,9 +41,9 @@ jobs: python helpers/update_pyquarc.py --force - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v5 with: - node-version: "14.15.1" + node-version: "20" - name: Install CDK run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d14e2ff..64e98ea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,18 +10,18 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v6 with: - python-version: 3.8 + python-version: 3.9 - name: Install Python dependencies run: pip install black flake8 - name: Run linters - uses: wearerequired/lint-action@v1 + uses: wearerequired/lint-action@v2 with: black: true flake8: true diff --git a/.github/workflows/update_pyquarc.yml b/.github/workflows/update_pyquarc.yml index 38f35be..22a9f31 100644 --- a/.github/workflows/update_pyquarc.yml +++ b/.github/workflows/update_pyquarc.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Set environment based on branch run: | @@ -21,14 +21,14 @@ jobs: fi - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.9 From a9801e878481bc6b152022add9926195ed0e5c68 Mon Sep 17 00:00:00 2001 From: Slesa Adhikari Date: Thu, 23 Jul 2026 15:04:43 -0500 Subject: [PATCH 2/2] Fix black and flake8 lint errors The lint workflow flagged pre-existing issues in the deploy package: - flake8 F401: remove unused DockerImage import in stack.py. - black: reformat the BundlingOptions command list onto separate lines and drop the extra blank line in app.py. All 8 tracked Python files now pass `black --check --line-length 100` and `flake8`. --- deploy/app.py | 1 - deploy/deploy/stack.py | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/app.py b/deploy/app.py index 3385298..857af67 100644 --- a/deploy/app.py +++ b/deploy/app.py @@ -6,7 +6,6 @@ from deploy.stack import AppStack - app = App() AppStack(app, f"{APP_NAME}-{ENV}") diff --git a/deploy/deploy/stack.py b/deploy/deploy/stack.py index e463c85..76ac630 100644 --- a/deploy/deploy/stack.py +++ b/deploy/deploy/stack.py @@ -5,7 +5,6 @@ aws_lambda as lambda_, aws_apigateway as apigateway, BundlingOptions, - DockerImage, ) @@ -37,8 +36,10 @@ def __init__(self, scope, construct_id, **kwargs): bundling=BundlingOptions( image=lambda_.Runtime.PYTHON_3_9.bundling_image, command=[ - "sh", "-c", "pip install -r requirements.txt -t /asset-output && cp -au . /asset-output" - ] + "sh", + "-c", + "pip install -r requirements.txt -t /asset-output && cp -au . /asset-output", + ], ), ), runtime=lambda_.Runtime.PYTHON_3_9,