From 3a8a34dc1e998d7e13433b7934e6807badce9a04 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 10:57:46 -0700 Subject: [PATCH 01/19] nightly integ fix --- .github/workflows/integration-tests.yml | 13 ------------- Makefile | 24 +++++++++++++++++------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 53002184306..97ae7f0a32a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -225,13 +225,6 @@ jobs: make setup-pytest make init-nightly echo "SAM_CLI_DEV=" >> $GITHUB_ENV - # Detect venv python/pytest path (bin on Linux/macOS, Scripts on Windows) - if [ -f "$HOME/pytest/bin/python3" ]; then - echo "SCRIPT_PY=$HOME/pytest/bin/python3" >> $GITHUB_ENV - else - echo "SCRIPT_PY=$HOME/pytest/Scripts/python.exe" >> $GITHUB_ENV - echo "$HOME/pytest/Scripts" >> $GITHUB_PATH - fi - name: Initialize latest release test if: env.TEST_TYPE == 'latest-release' @@ -242,12 +235,6 @@ jobs: make setup-pytest make init-latest-release echo "SAM_CLI_DEV=" >> $GITHUB_ENV - if [ -f "$HOME/pytest/bin/python3" ]; then - echo "SCRIPT_PY=$HOME/pytest/bin/python3" >> $GITHUB_ENV - else - echo "SCRIPT_PY=$HOME/pytest/Scripts/python.exe" >> $GITHUB_ENV - echo "$HOME/pytest/Scripts" >> $GITHUB_PATH - fi - name: Configure AWS credentials via OIDC uses: aws-actions/configure-aws-credentials@v6 diff --git a/Makefile b/Makefile index a653ce18c7e..c6ebc255591 100644 --- a/Makefile +++ b/Makefile @@ -13,17 +13,27 @@ init: SAM_CLI_DEV=1 pip install -e '.[dev]'; \ fi -# Set up a pytest venv with test dependencies # Set up a pytest venv with test dependencies (cross-platform) setup-pytest: - python3.11 -m venv $(HOME)/pytest || python3 -m venv $(HOME)/pytest || python -m venv $(HOME)/pytest - uv pip install --python $(HOME)/pytest/bin/python3 --only-deps --extra dev '.' 2>/dev/null || \ - uv pip install --python $(HOME)/pytest/Scripts/python.exe --only-deps --extra dev '.' - @if [ -f "$(HOME)/pytest/bin/pytest" ]; then \ + @if [ "$${RUNNER_OS:-$$(uname)}" = "Windows" ]; then \ + python -m venv $(HOME)/pytest; \ + VENV_PY="$(HOME)/pytest/Scripts/python.exe"; \ + SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ + $(HOME)/pytest/Scripts/pytest --version; \ + if [ -n "$$GITHUB_ENV" ]; then \ + echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ + echo "$(HOME)/pytest/Scripts" >> "$$GITHUB_PATH"; \ + fi; \ + else \ + python3.11 -m venv $(HOME)/pytest; \ + VENV_PY="$(HOME)/pytest/bin/python3"; \ + SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ sudo ln -sf $(HOME)/pytest/bin/pytest /usr/local/bin/pytest 2>/dev/null || true; \ + $(HOME)/pytest/bin/pytest --version; \ + if [ -n "$$GITHUB_ENV" ]; then \ + echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ + fi; \ fi - $(HOME)/pytest/bin/pytest --version 2>/dev/null || $(HOME)/pytest/Scripts/pytest --version - # Install SAM CLI nightly binary init-nightly: bash tests/install-sam-cli-binary.sh sam-cli-nightly From 7aeccc32623fb0b56bb08e0411841804e15c1d4d Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 11:14:47 -0700 Subject: [PATCH 02/19] add test branch rule --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 97ae7f0a32a..77da770efca 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -112,7 +112,7 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - ref: ${{ env.TEST_TYPE == 'nightly-release' && 'nightly-builds' || (github.event_name == 'schedule' && 'develop' || github.ref) }} + ref: ${{ github.ref == 'refs/heads/nightly-integ-fix' && 'nightly-integ-fix' || (github.event_name == 'schedule' && 'develop' || github.ref) }} - name: Free up disk space shell: bash From 17a5854f952cf72eb42330f414936730f4a14798 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 12:10:00 -0700 Subject: [PATCH 03/19] fix watchdog 6 sideeffect --- samcli/lib/utils/path_observer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samcli/lib/utils/path_observer.py b/samcli/lib/utils/path_observer.py index d22546d4d22..7db7cc7cd05 100644 --- a/samcli/lib/utils/path_observer.py +++ b/samcli/lib/utils/path_observer.py @@ -167,7 +167,7 @@ def schedule_handler(self, path_handler: PathHandler) -> ObservedWatch: ObservedWatch corresponding to the PathHandler. If static_folder is True, the parent folder watch will be returned instead. """ - watch: ObservedWatch = self.schedule(path_handler.event_handler, str(path_handler.path), path_handler.recursive) + watch: ObservedWatch = self.schedule(path_handler.event_handler, str(path_handler.path), recursive=path_handler.recursive) if path_handler.static_folder: static_wrapper = StaticFolderWrapper(self, watch, path_handler) parent_path_handler = static_wrapper.get_dir_parent_path_handler() From 37567c1003e2ecfb9cc53e55ca63177f8f9c0881 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 12:28:27 -0700 Subject: [PATCH 04/19] fix MSYS2 path mangling for AWS credentials on Windows; dedup SCRIPT_PY export into Makefile --- .github/workflows/integration-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 77da770efca..8ead68e8941 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -41,6 +41,10 @@ env: UV_PYTHON: python3.11 CREDENTIAL_DISTRIBUTION_LAMBDA_ARN: ${{ secrets.CREDENTIAL_DISTRIBUTION_LAMBDA_ARN }} ACCOUNT_RESET_LAMBDA_ARN: ${{ secrets.ACCOUNT_RESET_LAMBDA_ARN }} + # Prevent MSYS2 bash (from Ruby) from mangling env vars that look like paths. + # AWS credentials often contain / and + which MSYS2 would otherwise path-translate. + MSYS2_ARG_CONV_EXCL: "*" + MSYS_NO_PATHCONV: 1 jobs: integration-tests: From c65b0c5482b58c38934231e180b2dde6d57c4be9 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 12:31:26 -0700 Subject: [PATCH 05/19] black --- samcli/lib/utils/path_observer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samcli/lib/utils/path_observer.py b/samcli/lib/utils/path_observer.py index 7db7cc7cd05..ad761a15362 100644 --- a/samcli/lib/utils/path_observer.py +++ b/samcli/lib/utils/path_observer.py @@ -167,7 +167,9 @@ def schedule_handler(self, path_handler: PathHandler) -> ObservedWatch: ObservedWatch corresponding to the PathHandler. If static_folder is True, the parent folder watch will be returned instead. """ - watch: ObservedWatch = self.schedule(path_handler.event_handler, str(path_handler.path), recursive=path_handler.recursive) + watch: ObservedWatch = self.schedule( + path_handler.event_handler, str(path_handler.path), recursive=path_handler.recursive + ) if path_handler.static_folder: static_wrapper = StaticFolderWrapper(self, watch, path_handler) parent_path_handler = static_wrapper.get_dir_parent_path_handler() From 0ab94b263e5e0e3d24326e3144131ee8af2ba700 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 13:36:42 -0700 Subject: [PATCH 06/19] revert watchdog --- .github/workflows/integration-tests.yml | 8 +-- Makefile | 9 ++-- pyproject.toml | 2 +- requirements/reproducible-linux.txt | 67 +++++++++++++------------ requirements/reproducible-mac.txt | 67 +++++++++++++------------ requirements/reproducible-win.txt | 67 +++++++++++++------------ samcli/lib/utils/path_observer.py | 4 +- 7 files changed, 119 insertions(+), 105 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8ead68e8941..e1b76ff150c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -441,21 +441,21 @@ jobs: esac - name: Upload test results - if: always() + if: always() && env.SCRIPT_PY != '' uses: actions/upload-artifact@v7 with: name: test-results-${{ matrix.test_suite }} path: TEST_REPORT-*.json - name: Re-authenticate with OIDC for cleanup - if: always() + if: always() && env.SCRIPT_PY != '' uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} aws-region: us-east-1 - name: Assume test reporting role - if: always() + if: always() && env.SCRIPT_PY != '' uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ secrets.TESTREPORTING_ARN }} @@ -463,7 +463,7 @@ jobs: role-chaining: true - name: Reset test account and upload reports - if: always() + if: always() && env.SCRIPT_PY != '' shell: bash env: TESTREPORTING_S3: ${{ secrets.TESTREPORTING_S3 }} diff --git a/Makefile b/Makefile index c6ebc255591..07c489c997b 100644 --- a/Makefile +++ b/Makefile @@ -16,13 +16,14 @@ init: # Set up a pytest venv with test dependencies (cross-platform) setup-pytest: @if [ "$${RUNNER_OS:-$$(uname)}" = "Windows" ]; then \ - python -m venv $(HOME)/pytest; \ - VENV_PY="$(HOME)/pytest/Scripts/python.exe"; \ + VENV_DIR="$$USERPROFILE/pytest"; \ + python -m venv "$$VENV_DIR"; \ + VENV_PY="$$VENV_DIR/Scripts/python.exe"; \ SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ - $(HOME)/pytest/Scripts/pytest --version; \ + "$$VENV_DIR/Scripts/pytest" --version; \ if [ -n "$$GITHUB_ENV" ]; then \ echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ - echo "$(HOME)/pytest/Scripts" >> "$$GITHUB_PATH"; \ + echo "$$VENV_DIR/Scripts" >> "$$GITHUB_PATH"; \ fi; \ else \ python3.11 -m venv $(HOME)/pytest; \ diff --git a/pyproject.toml b/pyproject.toml index f34e189ca5a..734d112017f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dependencies = [ "requests~=2.32.5", "aws_lambda_builders==1.63.0", "tomlkit==0.14.0", - "watchdog==6.0.0", + "watchdog==4.0.2", "rich~=14.3.3", "pyopenssl~=25.3.0", # Pin to <4.27 until SAM-T no longer uses RefResolver diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index 34237d5ce15..1280e828432 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -1171,37 +1171,42 @@ urllib3==2.6.3 \ # botocore # docker # requests -watchdog==6.0.0 \ - --hash=sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a \ - --hash=sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2 \ - --hash=sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f \ - --hash=sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c \ - --hash=sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c \ - --hash=sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c \ - --hash=sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0 \ - --hash=sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13 \ - --hash=sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134 \ - --hash=sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa \ - --hash=sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e \ - --hash=sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379 \ - --hash=sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a \ - --hash=sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11 \ - --hash=sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282 \ - --hash=sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b \ - --hash=sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f \ - --hash=sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c \ - --hash=sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112 \ - --hash=sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948 \ - --hash=sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881 \ - --hash=sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860 \ - --hash=sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3 \ - --hash=sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680 \ - --hash=sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26 \ - --hash=sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26 \ - --hash=sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e \ - --hash=sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8 \ - --hash=sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c \ - --hash=sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2 +watchdog==4.0.2 \ + --hash=sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4 \ + --hash=sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19 \ + --hash=sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a \ + --hash=sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa \ + --hash=sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a \ + --hash=sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a \ + --hash=sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1 \ + --hash=sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc \ + --hash=sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9 \ + --hash=sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930 \ + --hash=sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73 \ + --hash=sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b \ + --hash=sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83 \ + --hash=sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7 \ + --hash=sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef \ + --hash=sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1 \ + --hash=sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040 \ + --hash=sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b \ + --hash=sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270 \ + --hash=sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c \ + --hash=sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d \ + --hash=sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8 \ + --hash=sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508 \ + --hash=sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b \ + --hash=sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503 \ + --hash=sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757 \ + --hash=sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b \ + --hash=sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29 \ + --hash=sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c \ + --hash=sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22 \ + --hash=sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578 \ + --hash=sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e \ + --hash=sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee \ + --hash=sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7 \ + --hash=sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3 # via aws-sam-cli (pyproject.toml) werkzeug==3.1.6 \ --hash=sha256:210c6bede5a420a913956b4791a7f4d6843a43b6fcee4dfa08a65e93007d0d25 \ diff --git a/requirements/reproducible-mac.txt b/requirements/reproducible-mac.txt index d66a7520afb..bc2020fa56d 100644 --- a/requirements/reproducible-mac.txt +++ b/requirements/reproducible-mac.txt @@ -1171,37 +1171,42 @@ urllib3==2.6.3 \ # botocore # docker # requests -watchdog==6.0.0 \ - --hash=sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a \ - --hash=sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2 \ - --hash=sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f \ - --hash=sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c \ - --hash=sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c \ - --hash=sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c \ - --hash=sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0 \ - --hash=sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13 \ - --hash=sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134 \ - --hash=sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa \ - --hash=sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e \ - --hash=sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379 \ - --hash=sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a \ - --hash=sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11 \ - --hash=sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282 \ - --hash=sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b \ - --hash=sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f \ - --hash=sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c \ - --hash=sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112 \ - --hash=sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948 \ - --hash=sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881 \ - --hash=sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860 \ - --hash=sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3 \ - --hash=sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680 \ - --hash=sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26 \ - --hash=sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26 \ - --hash=sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e \ - --hash=sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8 \ - --hash=sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c \ - --hash=sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2 +watchdog==4.0.2 \ + --hash=sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4 \ + --hash=sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19 \ + --hash=sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a \ + --hash=sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa \ + --hash=sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a \ + --hash=sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a \ + --hash=sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1 \ + --hash=sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc \ + --hash=sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9 \ + --hash=sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930 \ + --hash=sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73 \ + --hash=sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b \ + --hash=sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83 \ + --hash=sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7 \ + --hash=sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef \ + --hash=sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1 \ + --hash=sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040 \ + --hash=sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b \ + --hash=sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270 \ + --hash=sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c \ + --hash=sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d \ + --hash=sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8 \ + --hash=sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508 \ + --hash=sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b \ + --hash=sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503 \ + --hash=sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757 \ + --hash=sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b \ + --hash=sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29 \ + --hash=sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c \ + --hash=sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22 \ + --hash=sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578 \ + --hash=sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e \ + --hash=sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee \ + --hash=sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7 \ + --hash=sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3 # via aws-sam-cli (pyproject.toml) werkzeug==3.1.6 \ --hash=sha256:210c6bede5a420a913956b4791a7f4d6843a43b6fcee4dfa08a65e93007d0d25 \ diff --git a/requirements/reproducible-win.txt b/requirements/reproducible-win.txt index 4c3d4593608..afa5e00aafb 100644 --- a/requirements/reproducible-win.txt +++ b/requirements/reproducible-win.txt @@ -1184,37 +1184,42 @@ urllib3==2.6.3 \ # botocore # docker # requests -watchdog==6.0.0 \ - --hash=sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a \ - --hash=sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2 \ - --hash=sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f \ - --hash=sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c \ - --hash=sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c \ - --hash=sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c \ - --hash=sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0 \ - --hash=sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13 \ - --hash=sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134 \ - --hash=sha256:7a0e56874cfbc4b9b05c60c8a1926fedf56324bb08cfbc188969777940aef3aa \ - --hash=sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e \ - --hash=sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379 \ - --hash=sha256:90c8e78f3b94014f7aaae121e6b909674df5b46ec24d6bebc45c44c56729af2a \ - --hash=sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11 \ - --hash=sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282 \ - --hash=sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b \ - --hash=sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f \ - --hash=sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c \ - --hash=sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112 \ - --hash=sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948 \ - --hash=sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881 \ - --hash=sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860 \ - --hash=sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3 \ - --hash=sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680 \ - --hash=sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26 \ - --hash=sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26 \ - --hash=sha256:e6439e374fc012255b4ec786ae3c4bc838cd7309a540e5fe0952d03687d8804e \ - --hash=sha256:e6f0e77c9417e7cd62af82529b10563db3423625c5fce018430b249bf977f9e8 \ - --hash=sha256:e7631a77ffb1f7d2eefa4445ebbee491c720a5661ddf6df3498ebecae5ed375c \ - --hash=sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2 +watchdog==4.0.2 \ + --hash=sha256:0b4359067d30d5b864e09c8597b112fe0a0a59321a0f331498b013fb097406b4 \ + --hash=sha256:0d8a7e523ef03757a5aa29f591437d64d0d894635f8a50f370fe37f913ce4e19 \ + --hash=sha256:0e83619a2d5d436a7e58a1aea957a3c1ccbf9782c43c0b4fed80580e5e4acd1a \ + --hash=sha256:10b6683df70d340ac3279eff0b2766813f00f35a1d37515d2c99959ada8f05fa \ + --hash=sha256:132937547a716027bd5714383dfc40dc66c26769f1ce8a72a859d6a48f371f3a \ + --hash=sha256:1cdcfd8142f604630deef34722d695fb455d04ab7cfe9963055df1fc69e6727a \ + --hash=sha256:2d468028a77b42cc685ed694a7a550a8d1771bb05193ba7b24006b8241a571a1 \ + --hash=sha256:32be97f3b75693a93c683787a87a0dc8db98bb84701539954eef991fb35f5fbc \ + --hash=sha256:770eef5372f146997638d737c9a3c597a3b41037cfbc5c41538fc27c09c3a3f9 \ + --hash=sha256:7c7d4bf585ad501c5f6c980e7be9c4f15604c7cc150e942d82083b31a7548930 \ + --hash=sha256:88456d65f207b39f1981bf772e473799fcdc10801062c36fd5ad9f9d1d463a73 \ + --hash=sha256:914285126ad0b6eb2258bbbcb7b288d9dfd655ae88fa28945be05a7b475a800b \ + --hash=sha256:936acba76d636f70db8f3c66e76aa6cb5136a936fc2a5088b9ce1c7a3508fc83 \ + --hash=sha256:980b71510f59c884d684b3663d46e7a14b457c9611c481e5cef08f4dd022eed7 \ + --hash=sha256:984306dc4720da5498b16fc037b36ac443816125a3705dfde4fd90652d8028ef \ + --hash=sha256:a2cffa171445b0efa0726c561eca9a27d00a1f2b83846dbd5a4f639c4f8ca8e1 \ + --hash=sha256:aa160781cafff2719b663c8a506156e9289d111d80f3387cf3af49cedee1f040 \ + --hash=sha256:b2c45f6e1e57ebb4687690c05bc3a2c1fb6ab260550c4290b8abb1335e0fd08b \ + --hash=sha256:b4dfbb6c49221be4535623ea4474a4d6ee0a9cef4a80b20c28db4d858b64e270 \ + --hash=sha256:baececaa8edff42cd16558a639a9b0ddf425f93d892e8392a56bf904f5eff22c \ + --hash=sha256:bcfd02377be80ef3b6bc4ce481ef3959640458d6feaae0bd43dd90a43da90a7d \ + --hash=sha256:c0b14488bd336c5b1845cee83d3e631a1f8b4e9c5091ec539406e4a324f882d8 \ + --hash=sha256:c100d09ac72a8a08ddbf0629ddfa0b8ee41740f9051429baa8e31bb903ad7508 \ + --hash=sha256:c344453ef3bf875a535b0488e3ad28e341adbd5a9ffb0f7d62cefacc8824ef2b \ + --hash=sha256:c50f148b31b03fbadd6d0b5980e38b558046b127dc483e5e4505fcef250f9503 \ + --hash=sha256:c82253cfc9be68e3e49282831afad2c1f6593af80c0daf1287f6a92657986757 \ + --hash=sha256:cd67c7df93eb58f360c43802acc945fa8da70c675b6fa37a241e17ca698ca49b \ + --hash=sha256:d7ab624ff2f663f98cd03c8b7eedc09375a911794dfea6bf2a359fcc266bff29 \ + --hash=sha256:e252f8ca942a870f38cf785aef420285431311652d871409a64e2a0a52a2174c \ + --hash=sha256:ede7f010f2239b97cc79e6cb3c249e72962404ae3865860855d5cbe708b0fd22 \ + --hash=sha256:eeea812f38536a0aa859972d50c76e37f4456474b02bd93674d1947cf1e39578 \ + --hash=sha256:f15edcae3830ff20e55d1f4e743e92970c847bcddc8b7509bcd172aa04de506e \ + --hash=sha256:f5315a8c8dd6dd9425b974515081fc0aadca1d1d61e078d2246509fd756141ee \ + --hash=sha256:f6ee8dedd255087bc7fe82adf046f0b75479b989185fb0bdf9a98b612170eac7 \ + --hash=sha256:f7c739888c20f99824f7aa9d31ac8a97353e22d0c0e54703a547a218f6637eb3 # via aws-sam-cli (pyproject.toml) werkzeug==3.1.6 \ --hash=sha256:210c6bede5a420a913956b4791a7f4d6843a43b6fcee4dfa08a65e93007d0d25 \ diff --git a/samcli/lib/utils/path_observer.py b/samcli/lib/utils/path_observer.py index ad761a15362..d22546d4d22 100644 --- a/samcli/lib/utils/path_observer.py +++ b/samcli/lib/utils/path_observer.py @@ -167,9 +167,7 @@ def schedule_handler(self, path_handler: PathHandler) -> ObservedWatch: ObservedWatch corresponding to the PathHandler. If static_folder is True, the parent folder watch will be returned instead. """ - watch: ObservedWatch = self.schedule( - path_handler.event_handler, str(path_handler.path), recursive=path_handler.recursive - ) + watch: ObservedWatch = self.schedule(path_handler.event_handler, str(path_handler.path), path_handler.recursive) if path_handler.static_folder: static_wrapper = StaticFolderWrapper(self, watch, path_handler) parent_path_handler = static_wrapper.get_dir_parent_path_handler() From d67c7cd08e5dbb472b3cdcbb4508b21aea2d1591 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 14:15:15 -0700 Subject: [PATCH 07/19] fix setup ruby issue --- .github/workflows/integration-tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e1b76ff150c..177a901e0a5 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -194,6 +194,15 @@ jobs: with: ruby-version: '3.4.7' + - name: Restore Git Bash on Windows + if: runner.os == 'Windows' + shell: pwsh + run: | + # Ruby's setup-ruby action prepends MSYS2 bash to PATH, which mangles + # env vars and breaks MSI installs. Re-prepend Git Bash so shell: bash + # picks it up instead. + echo "C:\Program Files\Git\bin" | Out-File -Append -Encoding utf8 $env:GITHUB_PATH + - name: Install Rust toolchain and cargo-lambda if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "cloud-based-tests", "tier1-finch", "tier1-windows-build-2", "tier1-windows-build-3", "tier1-windows-other"]'), matrix.test_suite) shell: bash From 2c790fb75f403457519dc1351b7188b539928df7 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 14:25:31 -0700 Subject: [PATCH 08/19] fix path --- .github/workflows/integration-tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 177a901e0a5..44951b84ee1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -41,10 +41,6 @@ env: UV_PYTHON: python3.11 CREDENTIAL_DISTRIBUTION_LAMBDA_ARN: ${{ secrets.CREDENTIAL_DISTRIBUTION_LAMBDA_ARN }} ACCOUNT_RESET_LAMBDA_ARN: ${{ secrets.ACCOUNT_RESET_LAMBDA_ARN }} - # Prevent MSYS2 bash (from Ruby) from mangling env vars that look like paths. - # AWS credentials often contain / and + which MSYS2 would otherwise path-translate. - MSYS2_ARG_CONV_EXCL: "*" - MSYS_NO_PATHCONV: 1 jobs: integration-tests: @@ -175,6 +171,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: '10.0.x' + cache: true - name: Set up Ruby 3.3.7 if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "other-and-e2e", "cloud-based-tests"]'), matrix.test_suite) From ffdc2da7d1ea30e8fd895391dc8eb5c2a997de89 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 14:30:29 -0700 Subject: [PATCH 09/19] remove cache in dotnet --- .github/workflows/integration-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 44951b84ee1..cfc1782f60f 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -171,7 +171,6 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: '10.0.x' - cache: true - name: Set up Ruby 3.3.7 if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "other-and-e2e", "cloud-based-tests"]'), matrix.test_suite) From 829875647ca7827b74e201d2ff9dc784c33e5055 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 15:07:23 -0700 Subject: [PATCH 10/19] uv --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 07c489c997b..f40fe34158b 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,14 @@ SAM_CLI_TELEMETRY ?= 0 init: @if [ "$$GITHUB_ACTIONS" = "true" ]; then \ command -v uv >/dev/null 2>&1 || pip install uv==0.9.1; \ - SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find $$UV_PYTHON)" -e '.[dev]'; \ + SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find $$UV_PYTHON --managed-python)" -e '.[dev]'; \ else \ SAM_CLI_DEV=1 pip install -e '.[dev]'; \ fi # Set up a pytest venv with test dependencies (cross-platform) setup-pytest: - @if [ "$${RUNNER_OS:-$$(uname)}" = "Windows" ]; then \ + @if [ "$${RUNNER_OS:-}" = "Windows" ]; then \ VENV_DIR="$$USERPROFILE/pytest"; \ python -m venv "$$VENV_DIR"; \ VENV_PY="$$VENV_DIR/Scripts/python.exe"; \ From 14df4f1eb9804fd27071870afbf654dbc25c0f4d Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 15:33:50 -0700 Subject: [PATCH 11/19] check --- .github/workflows/integration-tests.yml | 46 ++++++++++++------------- Makefile | 11 +++--- pyproject.toml | 2 +- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cfc1782f60f..bf845c888e5 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -53,29 +53,29 @@ jobs: matrix: os: [ubuntu-latest] test_suite: - # Build jobs (no-container mode — requires language toolchains) - - build-x86-1 - - build-x86-2 - - build-arm64 - # Build jobs (docker container mode) - - build-x86-container-1 - - build-x86-container-2 - - build-arm64-container-1 - - build-arm64-container-2 - # Docker-only test suites - - terraform-build - - terraform-start-api - - terraform-invoke-start-lambda - - package - - deploy - - sync-code - - sync-watch - - local-invoke - - local-start-api - - local-start-lambda - - other-and-e2e - # Runs only credential-requiring tests from build and local - - cloud-based-tests + # # Build jobs (no-container mode — requires language toolchains) + # - build-x86-1 + # - build-x86-2 + # - build-arm64 + # # Build jobs (docker container mode) + # - build-x86-container-1 + # - build-x86-container-2 + # - build-arm64-container-1 + # - build-arm64-container-2 + # # Docker-only test suites + # - terraform-build + # - terraform-start-api + # - terraform-invoke-start-lambda + # - package + # - deploy + # - sync-code + # - sync-watch + # - local-invoke + # - local-start-api + # - local-start-lambda + # - other-and-e2e + # # Runs only credential-requiring tests from build and local + # - cloud-based-tests # Tier 1: Cross-platform smoke tests with Finch runtime - tier1-finch include: diff --git a/Makefile b/Makefile index f40fe34158b..03b1fb30515 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ SAM_CLI_TELEMETRY ?= 0 init: @if [ "$$GITHUB_ACTIONS" = "true" ]; then \ command -v uv >/dev/null 2>&1 || pip install uv==0.9.1; \ - SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find $$UV_PYTHON --managed-python)" -e '.[dev]'; \ + SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python $$UV_PYTHON -e '.[dev]'; \ else \ SAM_CLI_DEV=1 pip install -e '.[dev]'; \ fi @@ -16,14 +16,13 @@ init: # Set up a pytest venv with test dependencies (cross-platform) setup-pytest: @if [ "$${RUNNER_OS:-}" = "Windows" ]; then \ - VENV_DIR="$$USERPROFILE/pytest"; \ - python -m venv "$$VENV_DIR"; \ - VENV_PY="$$VENV_DIR/Scripts/python.exe"; \ + python3.11 -m venv $(HOME)/pytest; \ + VENV_PY="$(HOME)/pytest/Scripts/python.exe"; \ SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ - "$$VENV_DIR/Scripts/pytest" --version; \ + "$(HOME)/pytest/Scripts/pytest" --version; \ if [ -n "$$GITHUB_ENV" ]; then \ echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ - echo "$$VENV_DIR/Scripts" >> "$$GITHUB_PATH"; \ + echo "$(HOME)/pytest/Scripts" >> "$$GITHUB_PATH"; \ fi; \ else \ python3.11 -m venv $(HOME)/pytest; \ diff --git a/pyproject.toml b/pyproject.toml index 734d112017f..f14c37302dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ dynamic = ["version", "scripts"] description = "AWS SAM CLI is a CLI tool for local development and testing of Serverless applications" readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.10, <=3.14" +requires-python = ">=3.10" authors = [ { name = "Amazon Web Services", email = "aws-sam-developers@amazon.com" }, ] From 8b43877dd237ddda1c5ae153cb43204db3467854 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 15:37:13 -0700 Subject: [PATCH 12/19] check --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 03b1fb30515..25bd15c89ab 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ SAM_CLI_TELEMETRY ?= 0 init: @if [ "$$GITHUB_ACTIONS" = "true" ]; then \ command -v uv >/dev/null 2>&1 || pip install uv==0.9.1; \ - SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python $$UV_PYTHON -e '.[dev]'; \ + SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find)" -e '.[dev]'; \ else \ SAM_CLI_DEV=1 pip install -e '.[dev]'; \ fi From 478a32d31989eb3e7beb232f9466ed895ca175e1 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 15:56:48 -0700 Subject: [PATCH 13/19] check --- Makefile | 23 +++-------------------- tests/setup-pytest.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100755 tests/setup-pytest.sh diff --git a/Makefile b/Makefile index 25bd15c89ab..35f7ffb12dc 100644 --- a/Makefile +++ b/Makefile @@ -8,32 +8,15 @@ SAM_CLI_TELEMETRY ?= 0 init: @if [ "$$GITHUB_ACTIONS" = "true" ]; then \ command -v uv >/dev/null 2>&1 || pip install uv==0.9.1; \ - SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find)" -e '.[dev]'; \ + echo "=== UV_PYTHON resolved to: $$(uv python find $$UV_PYTHON) ==="; \ + SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find $$UV_PYTHON)" -e '.[dev]'; \ else \ SAM_CLI_DEV=1 pip install -e '.[dev]'; \ fi # Set up a pytest venv with test dependencies (cross-platform) setup-pytest: - @if [ "$${RUNNER_OS:-}" = "Windows" ]; then \ - python3.11 -m venv $(HOME)/pytest; \ - VENV_PY="$(HOME)/pytest/Scripts/python.exe"; \ - SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ - "$(HOME)/pytest/Scripts/pytest" --version; \ - if [ -n "$$GITHUB_ENV" ]; then \ - echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ - echo "$(HOME)/pytest/Scripts" >> "$$GITHUB_PATH"; \ - fi; \ - else \ - python3.11 -m venv $(HOME)/pytest; \ - VENV_PY="$(HOME)/pytest/bin/python3"; \ - SAM_CLI_DEV=1 uv pip install --python "$$VENV_PY" -e '.[dev]'; \ - sudo ln -sf $(HOME)/pytest/bin/pytest /usr/local/bin/pytest 2>/dev/null || true; \ - $(HOME)/pytest/bin/pytest --version; \ - if [ -n "$$GITHUB_ENV" ]; then \ - echo "SCRIPT_PY=$$VENV_PY" >> "$$GITHUB_ENV"; \ - fi; \ - fi + bash tests/setup-pytest.sh # Install SAM CLI nightly binary init-nightly: bash tests/install-sam-cli-binary.sh sam-cli-nightly diff --git a/tests/setup-pytest.sh b/tests/setup-pytest.sh new file mode 100755 index 00000000000..a140e350cbf --- /dev/null +++ b/tests/setup-pytest.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Set up a pytest venv with test dependencies (cross-platform). +# Also exports SCRIPT_PY to GITHUB_ENV and adds Scripts dir to GITHUB_PATH on Windows. +set -euo pipefail + +echo "=== UV_PYTHON resolved to: $(uv python find $UV_PYTHON) ===" + +if [ "${RUNNER_OS:-}" = "Windows" ]; then + python3 -m venv "$HOME/pytest" + VENV_PY="$HOME/pytest/Scripts/python.exe" + SAM_CLI_DEV=1 uv pip install --python "$VENV_PY" -e '.[dev]' + "$HOME/pytest/Scripts/pytest" --version + if [ -n "${GITHUB_ENV:-}" ]; then + echo "SCRIPT_PY=$VENV_PY" >> "$GITHUB_ENV" + echo "$HOME/pytest/Scripts" >> "$GITHUB_PATH" + fi +else + python3.11 -m venv "$HOME/pytest" + VENV_PY="$HOME/pytest/bin/python3" + SAM_CLI_DEV=1 uv pip install --python "$VENV_PY" -e '.[dev]' + sudo ln -sf "$HOME/pytest/bin/pytest" /usr/local/bin/pytest 2>/dev/null || true + "$HOME/pytest/bin/pytest" --version + if [ -n "${GITHUB_ENV:-}" ]; then + echo "SCRIPT_PY=$VENV_PY" >> "$GITHUB_ENV" + fi +fi From ee9563cf0637fa33bade847f68ed9dfee003f228 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 16:13:59 -0700 Subject: [PATCH 14/19] test --- Makefile | 2 +- tests/setup-pytest.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 35f7ffb12dc..9c829fe3640 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SAM_CLI_TELEMETRY ?= 0 # Initialize environment specifically for Github action tests using uv init: - @if [ "$$GITHUB_ACTIONS" = "true" ]; then \ + if [ "$$GITHUB_ACTIONS" = "true" ]; then \ command -v uv >/dev/null 2>&1 || pip install uv==0.9.1; \ echo "=== UV_PYTHON resolved to: $$(uv python find $$UV_PYTHON) ==="; \ SAM_CLI_DEV=1 uv pip install --system --break-system-packages --python "$$(uv python find $$UV_PYTHON)" -e '.[dev]'; \ diff --git a/tests/setup-pytest.sh b/tests/setup-pytest.sh index a140e350cbf..95fa73e0fe8 100755 --- a/tests/setup-pytest.sh +++ b/tests/setup-pytest.sh @@ -1,11 +1,11 @@ #!/bin/bash # Set up a pytest venv with test dependencies (cross-platform). # Also exports SCRIPT_PY to GITHUB_ENV and adds Scripts dir to GITHUB_PATH on Windows. -set -euo pipefail +set -eo pipefail -echo "=== UV_PYTHON resolved to: $(uv python find $UV_PYTHON) ===" +echo "=== UV_PYTHON resolved to: $(uv python find ${UV_PYTHON:-3.11}) ===" -if [ "${RUNNER_OS:-}" = "Windows" ]; then +if [ "${RUNNER_OS:-}" == "Windows" ] || [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]; then python3 -m venv "$HOME/pytest" VENV_PY="$HOME/pytest/Scripts/python.exe" SAM_CLI_DEV=1 uv pip install --python "$VENV_PY" -e '.[dev]' From 28676fffbd453bb47c5e975c568a5dab77792c46 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 16:40:20 -0700 Subject: [PATCH 15/19] check --- .github/workflows/integration-tests.yml | 10 +--------- tests/setup-pytest.sh | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bf845c888e5..592bf87faa0 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -189,15 +189,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4.7' - - - name: Restore Git Bash on Windows - if: runner.os == 'Windows' - shell: pwsh - run: | - # Ruby's setup-ruby action prepends MSYS2 bash to PATH, which mangles - # env vars and breaks MSI installs. Re-prepend Git Bash so shell: bash - # picks it up instead. - echo "C:\Program Files\Git\bin" | Out-File -Append -Encoding utf8 $env:GITHUB_PATH + windows-toolchain: none - name: Install Rust toolchain and cargo-lambda if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "cloud-based-tests", "tier1-finch", "tier1-windows-build-2", "tier1-windows-build-3", "tier1-windows-other"]'), matrix.test_suite) diff --git a/tests/setup-pytest.sh b/tests/setup-pytest.sh index 95fa73e0fe8..727b4f3e1ad 100755 --- a/tests/setup-pytest.sh +++ b/tests/setup-pytest.sh @@ -6,7 +6,7 @@ set -eo pipefail echo "=== UV_PYTHON resolved to: $(uv python find ${UV_PYTHON:-3.11}) ===" if [ "${RUNNER_OS:-}" == "Windows" ] || [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]; then - python3 -m venv "$HOME/pytest" + python3.11 -m venv "$HOME/pytest" VENV_PY="$HOME/pytest/Scripts/python.exe" SAM_CLI_DEV=1 uv pip install --python "$VENV_PY" -e '.[dev]' "$HOME/pytest/Scripts/pytest" --version From c4722c84389cdea75cc44b3147ffa8603ea99eb4 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 16:40:54 -0700 Subject: [PATCH 16/19] check --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5df2b92ddf..3ca16151b7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,6 +169,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" + windows-toolchain: none - uses: actions/setup-node@v6 with: node-version: 24 From 214c45b586718f850ed5f2bc43323b46b03fa930 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 16:55:42 -0700 Subject: [PATCH 17/19] add all test back --- .github/workflows/integration-tests.yml | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 592bf87faa0..4a0c74a8fde 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -53,29 +53,29 @@ jobs: matrix: os: [ubuntu-latest] test_suite: - # # Build jobs (no-container mode — requires language toolchains) - # - build-x86-1 - # - build-x86-2 - # - build-arm64 - # # Build jobs (docker container mode) - # - build-x86-container-1 - # - build-x86-container-2 - # - build-arm64-container-1 - # - build-arm64-container-2 - # # Docker-only test suites - # - terraform-build - # - terraform-start-api - # - terraform-invoke-start-lambda - # - package - # - deploy - # - sync-code - # - sync-watch - # - local-invoke - # - local-start-api - # - local-start-lambda - # - other-and-e2e - # # Runs only credential-requiring tests from build and local - # - cloud-based-tests + # Build jobs (no-container mode — requires language toolchains) + - build-x86-1 + - build-x86-2 + - build-arm64 + # Build jobs (docker container mode) + - build-x86-container-1 + - build-x86-container-2 + - build-arm64-container-1 + - build-arm64-container-2 + # Docker-only test suites + - terraform-build + - terraform-start-api + - terraform-invoke-start-lambda + - package + - deploy + - sync-code + - sync-watch + - local-invoke + - local-start-api + - local-start-lambda + - other-and-e2e + # Runs only credential-requiring tests from build and local + - cloud-based-tests # Tier 1: Cross-platform smoke tests with Finch runtime - tier1-finch include: From 20c0a295cc229d12eee8e7675b2f6dbd4dd449bc Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 17:05:42 -0700 Subject: [PATCH 18/19] a --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ca16151b7a..f5df2b92ddf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,7 +169,6 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" - windows-toolchain: none - uses: actions/setup-node@v6 with: node-version: 24 From 6ea6464fe87400e19044793c2a5809e5dc43e7c1 Mon Sep 17 00:00:00 2001 From: Roger Zhang Date: Wed, 11 Mar 2026 17:13:17 -0700 Subject: [PATCH 19/19] change checkout type --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 4a0c74a8fde..27563d132b4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -112,7 +112,7 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - ref: ${{ github.ref == 'refs/heads/nightly-integ-fix' && 'nightly-integ-fix' || (github.event_name == 'schedule' && 'develop' || github.ref) }} + ref: ${{ (env.TEST_TYPE == 'nightly-release' && github.event.action == 'published') && 'nightly-builds' || (github.event_name == 'schedule' && 'develop' || github.ref) }} - name: Free up disk space shell: bash