From 50329f00ab18a6edffff8eb67e216ca21f672abc Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 7 Jan 2026 15:05:36 -0800 Subject: [PATCH] use uv for reproducible --- .github/workflows/update-reproducibles.yml | 25 +++++++--------------- Makefile | 7 ++++++ requirements/reproducible-linux.txt | 20 ++++++----------- requirements/reproducible-mac.txt | 20 ++++++----------- requirements/reproducible-win.txt | 20 ++++++----------- 5 files changed, 36 insertions(+), 56 deletions(-) diff --git a/.github/workflows/update-reproducibles.yml b/.github/workflows/update-reproducibles.yml index cc368eea09..8751cd9371 100644 --- a/.github/workflows/update-reproducibles.yml +++ b/.github/workflows/update-reproducibles.yml @@ -15,32 +15,23 @@ jobs: pull-requests: write contents: write if: github.repository_owner == 'aws' - strategy: - matrix: - include: - - os: ubuntu-latest - python: 3.11 - target: update-reproducible-linux-reqs - - os: macos-latest - python: 3.11 - target: update-reproducible-mac-reqs - - os: windows-latest - python: 3.12 - target: update-reproducible-win-reqs - max-parallel: 1 - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: ref: ${{ github.head_ref }} - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python }} - - run: make ${{ matrix.target }} + python-version: "3.11" + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Update all reproducible requirements + run: make update-reproducible-reqs-uv - name: Push changes run: | git config --global user.email "action@github.com" git config --global user.name "GitHub Action" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git commit -am "Update reproducibles: ${{ matrix.target }}" || echo "nothing to commit" + git add requirements/reproducible-*.txt + git commit -m "Update reproducible requirements" || echo "nothing to commit" git push \ No newline at end of file diff --git a/Makefile b/Makefile index 6482cb7932..7dc11c6450 100644 --- a/Makefile +++ b/Makefile @@ -87,3 +87,10 @@ update-reproducible-win-reqs: update-reproducible-reqs: update-reproducible-linux-reqs update-reproducible-mac-reqs + +# Update all reproducible requirements using uv (can run from any platform) +update-reproducible-reqs-uv: + @command -v uv >/dev/null 2>&1 || pip install uv + uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-linux.txt --python-platform linux --python-version 3.11 --no-cache --no-strip-extras + uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-mac.txt --python-platform macos --python-version 3.11 --no-cache --no-strip-extras + uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-win.txt --python-platform windows --python-version 3.12 --no-cache --no-strip-extras diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index a4cccb8ef3..ba37fb1bd9 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-linux.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-linux.txt --python-platform linux --python-version 3.11 --no-cache --no-strip-extras annotated-types==0.7.0 \ --hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \ --hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89 @@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \ # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \ +boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \ --hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \ --hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee # via aws-sam-cli (setup.py) @@ -1156,6 +1152,10 @@ s3transfer==0.16.0 \ --hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \ --hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920 # via boto3 +setuptools==80.9.0 \ + --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ + --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c + # via aws-lambda-builders six==1.17.0 \ --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \ --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 @@ -1273,9 +1273,3 @@ wheel==0.45.1 \ --hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \ --hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248 # via aws-lambda-builders - -# The following packages are considered to be unsafe in a requirements file: -setuptools==80.9.0 \ - --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ - --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c - # via aws-lambda-builders diff --git a/requirements/reproducible-mac.txt b/requirements/reproducible-mac.txt index fe7a10bfbf..c775bf9cf5 100644 --- a/requirements/reproducible-mac.txt +++ b/requirements/reproducible-mac.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-mac.txt -# +# This file was autogenerated by uv via the following command: +# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-mac.txt --python-platform macos --python-version 3.11 --no-cache --no-strip-extras annotated-types==0.7.0 \ --hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \ --hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89 @@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \ # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \ +boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \ --hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \ --hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee # via aws-sam-cli (setup.py) @@ -1156,6 +1152,10 @@ s3transfer==0.16.0 \ --hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \ --hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920 # via boto3 +setuptools==80.9.0 \ + --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ + --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c + # via aws-lambda-builders six==1.17.0 \ --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \ --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 @@ -1273,9 +1273,3 @@ wheel==0.45.1 \ --hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \ --hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248 # via aws-lambda-builders - -# The following packages are considered to be unsafe in a requirements file: -setuptools==80.9.0 \ - --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ - --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c - # via aws-lambda-builders diff --git a/requirements/reproducible-win.txt b/requirements/reproducible-win.txt index 200e1b5692..a265ccc042 100644 --- a/requirements/reproducible-win.txt +++ b/requirements/reproducible-win.txt @@ -1,9 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --allow-unsafe --generate-hashes --output-file='requirements\reproducible-win.txt' -# +# This file was autogenerated by uv via the following command: +# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-win.txt --python-platform windows --python-version 3.12 --no-cache --no-strip-extras annotated-types==0.7.0 \ --hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \ --hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89 @@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \ # via # aws-sam-cli (setup.py) # aws-sam-translator -boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \ +boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \ --hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \ --hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee # via aws-sam-cli (setup.py) @@ -1182,6 +1178,10 @@ s3transfer==0.16.0 \ --hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \ --hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920 # via boto3 +setuptools==80.9.0 \ + --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ + --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c + # via aws-lambda-builders six==1.17.0 \ --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \ --hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81 @@ -1286,9 +1286,3 @@ wheel==0.45.1 \ --hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \ --hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248 # via aws-lambda-builders - -# The following packages are considered to be unsafe in a requirements file: -setuptools==80.9.0 \ - --hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \ - --hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c - # via aws-lambda-builders