Skip to content

Commit 8b2e775

Browse files
Merge from aws/aws-sam-cli/develop
2 parents 0006615 + e5d7ac8 commit 8b2e775

208 files changed

Lines changed: 4236 additions & 2716 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/automated-updates-to-sam-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
python-version: "3.11"
9898

9999
- name: Install uv
100-
uses: astral-sh/setup-uv@v7
100+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
101101

102102
- name: Update aws-sam-translator & commit
103103
run: |
@@ -166,7 +166,7 @@ jobs:
166166
python-version: "3.11"
167167

168168
- name: Install uv
169-
uses: astral-sh/setup-uv@v7
169+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
170170

171171
- name: Upgrade aws_lambda_builders & commit
172172
run: |

.github/workflows/build.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
6666
if: ${{ matrix.os == 'windows-latest' }}
6767
- uses: actions/checkout@v6
68-
- uses: astral-sh/setup-uv@v7
68+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
6969
with:
7070
python-version: ${{ matrix.python }}
7171
cache-python: false
@@ -79,12 +79,11 @@ jobs:
7979
name: Validate JSON schema
8080
if: github.repository_owner == 'aws'
8181
permissions:
82-
pull-requests: write
83-
contents: write
82+
contents: read
8483
runs-on: ubuntu-latest
8584
steps:
8685
- uses: actions/checkout@v6
87-
- uses: astral-sh/setup-uv@v7
86+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
8887
with:
8988
python-version: "3.11"
9089
cache-python: false
@@ -126,17 +125,19 @@ jobs:
126125
# folders that is commented below requires credentials, no need to spare time to run them
127126
tests_config:
128127
- name: "integ-buildcmd-arm64"
129-
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py"
128+
params: "-n 2 --reruns 3 -m 'not pr_skip' tests/integration/buildcmd/test_build_cmd_arm64.py"
129+
- name: "integ-buildcmd-python"
130+
params: "-n 2 --reruns 3 -m 'not pr_skip' tests/integration/buildcmd/test_build_cmd_python.py"
130131
- name: "integ-buildcmd-main"
131-
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_dotnet.py tests/integration/buildcmd/test_build_cmd_provided.py tests/integration/buildcmd/test_build_cmd_rust.py tests/integration/buildcmd/test_build_cmd_python.py tests/integration/buildcmd/test_build_cmd_node.py"
132+
params: "-n 2 --reruns 3 -m 'not pr_skip' tests/integration/buildcmd/test_build_cmd_dotnet.py tests/integration/buildcmd/test_build_cmd_provided.py tests/integration/buildcmd/test_build_cmd_rust.py tests/integration/buildcmd/test_build_cmd_node.py"
132133
- name: "integ-buildcmd-java"
133-
params: "-n 2 --reruns 5 tests/integration/buildcmd/test_build_cmd_java.py"
134+
params: "-n 3 --reruns 5 tests/integration/buildcmd/test_build_cmd_java.py"
134135
- name: "integ-buildcmd-other"
135136
params: "-n 2 --reruns 3 tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_cmd_arm64.py --ignore=tests/integration/buildcmd/test_build_cmd_dotnet.py --ignore=tests/integration/buildcmd/test_build_cmd_provided.py --ignore=tests/integration/buildcmd/test_build_cmd_rust.py --ignore=tests/integration/buildcmd/test_build_cmd_python.py --ignore=tests/integration/buildcmd/test_build_cmd_node.py --ignore=tests/integration/buildcmd/test_build_cmd_java.py"
136137
#- "delete"
137138
#- "deploy"
138139
- name: "integ-all-other"
139-
params: "-n 2 --reruns 3 tests/integration/init tests/integration/local tests/integration/pipeline tests/integration/root tests/integration/scripts tests/integration/telemetry tests/integration/docs --ignore=tests/integration/local/invoke/test_invoke_durable.py --ignore=tests/integration/local/start_api/test_start_api_durable.py --ignore=tests/integration/local/start_lambda/test_start_lambda_durable.py"
140+
params: "-n 2 --reruns 3 -m 'not pr_skip' tests/integration/init tests/integration/local tests/integration/pipeline tests/integration/root tests/integration/scripts tests/integration/telemetry tests/integration/docs --ignore=tests/integration/local/invoke/test_invoke_durable.py --ignore=tests/integration/local/start_api/test_start_api_durable.py --ignore=tests/integration/local/start_lambda/test_start_lambda_durable.py"
140141
- name: "durable-functions"
141142
params: "--reruns 3 tests/integration/local/invoke/test_invoke_durable.py tests/integration/local/start_api/test_start_api_durable.py tests/integration/local/start_lambda/test_start_lambda_durable.py"
142143
#- "list"
@@ -157,7 +158,7 @@ jobs:
157158
mkdir "D:\\Temp"
158159
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
159160
if: ${{ matrix.os == 'windows-latest' }}
160-
- uses: astral-sh/setup-uv@v7
161+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
161162
with:
162163
python-version: ${{ matrix.python }}
163164
cache-python: false
@@ -166,7 +167,7 @@ jobs:
166167
- uses: actions/setup-go@v6
167168
with:
168169
go-version: '1.19'
169-
- uses: ruby/setup-ruby@v1
170+
- uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
170171
with:
171172
ruby-version: "3.3"
172173
- uses: actions/setup-node@v6
@@ -215,30 +216,38 @@ jobs:
215216
- "3.10"
216217
- "3.11"
217218
tests_config:
218-
- name: "Smoke & Functional Tests - All"
219+
- name: "Smoke Tests - First Half"
220+
os: ubuntu-latest
221+
params: "-n 4 tests/smoke"
222+
env_vars: "first-half"
223+
- name: "Smoke Tests - Second Half & Functional Tests"
219224
os: ubuntu-latest
220225
params: "-n 4 tests/smoke tests/functional"
221-
env_vars: "all"
222-
- name: "Smoke Tests - First Third"
226+
env_vars: "second-half"
227+
- name: "Smoke Tests - First Quarter"
228+
os: windows-latest
229+
params: "-n 4 tests/smoke"
230+
env_vars: "first-quarter"
231+
- name: "Smoke Tests - Second Quarter"
223232
os: windows-latest
224233
params: "-n 4 tests/smoke"
225-
env_vars: "first-third"
226-
- name: "Smoke Tests - Second Third"
234+
env_vars: "second-quarter"
235+
- name: "Smoke Tests - Third Quarter"
227236
os: windows-latest
228237
params: "-n 4 tests/smoke"
229-
env_vars: "second-third"
230-
- name: "Smoke Tests - Third Third & Functional Tests"
238+
env_vars: "third-quarter"
239+
- name: "Smoke Tests - Fourth Quarter & Functional Tests"
231240
os: windows-latest
232241
params: "-n 4 tests/smoke tests/functional"
233-
env_vars: "third-third"
242+
env_vars: "fourth-quarter"
234243
steps:
235244
- uses: actions/checkout@v6
236245
- name: Set TEMP to D:/Temp
237246
run: |
238247
mkdir "D:\\Temp"
239248
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
240249
if: ${{ matrix.os == 'windows-latest' }}
241-
- uses: astral-sh/setup-uv@v7
250+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
242251
with:
243252
python-version: ${{ matrix.python }}
244253
cache-python: false
@@ -270,7 +279,7 @@ jobs:
270279
mkdir "D:\\Temp"
271280
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
272281
if: ${{ matrix.os == 'windows-latest' }}
273-
- uses: astral-sh/setup-uv@v7
282+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
274283
with:
275284
python-version: "3.10"
276285
cache-python: false

.github/workflows/integration-tests.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
run: bash tests/setup-wsl.sh
131131

132132
- name: Install uv
133-
uses: astral-sh/setup-uv@v7
133+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
134134
with:
135135
python-version: "3.11"
136136
cache-python: false
@@ -178,19 +178,19 @@ jobs:
178178

179179
- name: Set up Ruby 3.3.7
180180
if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "other-and-e2e", "cloud-based-tests"]'), matrix.test_suite)
181-
uses: ruby/setup-ruby@v1
181+
uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
182182
with:
183183
ruby-version: '3.3.7'
184184

185185
- name: Set up Ruby 3.2.7
186186
if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "other-and-e2e", "cloud-based-tests"]'), matrix.test_suite)
187-
uses: ruby/setup-ruby@v1
187+
uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
188188
with:
189189
ruby-version: '3.2.7'
190190

191191
- name: Set up Ruby 3.4.7
192192
if: contains(fromJSON('["build-x86-1", "build-x86-2", "build-arm64", "sync-code", "sync-watch", "other-and-e2e", "cloud-based-tests", "tier1-finch", "tier1-windows-build-1", "tier1-windows-build-2", "tier1-windows-build-3", "tier1-windows-other"]'), matrix.test_suite)
193-
uses: ruby/setup-ruby@v1
193+
uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
194194
with:
195195
ruby-version: '3.4.7'
196196
windows-toolchain: none
@@ -202,8 +202,9 @@ jobs:
202202

203203
- name: Install Terraform
204204
if: contains(fromJSON('["terraform-build", "terraform-start-api", "terraform-invoke-start-lambda", "cloud-based-tests", "tier1-finch", "tier1-windows-build-1", "tier1-windows-build-2", "tier1-windows-build-3", "tier1-windows-other"]'), matrix.test_suite)
205-
shell: bash
206-
run: bash tests/install-terraform.sh
205+
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
206+
with:
207+
terraform_wrapper: false
207208

208209
- name: Setup Finch runtime
209210
if: matrix.test_suite == 'tier1-finch'

.github/workflows/update-reproducibles.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
python-version: "3.11"
2828
- name: Install uv
29-
uses: astral-sh/setup-uv@v7
29+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3030
- name: Update all reproducible requirements
3131
run: make update-reproducible-reqs-uv
3232
- name: Push changes
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
python-version: "3.11"
4949
- name: Install uv
50-
uses: astral-sh/setup-uv@v7
50+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
5151
- name: Check reproducible requirements are up to date
5252
run: make update-reproducible-reqs-uv
5353
- name: Fail if requirements are out of date

.github/workflows/validate_pyinstaller.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ jobs:
2121
run: chmod +x ./installer/pyinstaller/build-linux.sh
2222
- name: Build PyInstaller in manylinux container
2323
run: |
24-
docker run --rm -v .:/samcli -w /samcli -e CI_OVERRIDE='1' \
25-
quay.io/pypa/manylinux2014_x86_64:latest /samcli/installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip
24+
for i in 1 2 3; do
25+
docker run --rm -v .:/samcli -w /samcli -e CI_OVERRIDE='1' \
26+
quay.io/pypa/manylinux2014_x86_64:latest /samcli/installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip && break
27+
echo "Attempt $i failed, retrying..."
28+
sleep 10
29+
done
2630
- uses: actions/setup-python@v6
2731
with:
2832
python-version: 3.11

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,20 @@ def test_tier1_my_feature_in_container(self):
123123

124124
4. Each runtime should have one non-container and one container tier 1 test.
125125

126+
### Skipping tests in PR workflow (`pr_skip`)
127+
128+
Tests marked with `@pytest.mark.pr_skip` are excluded from the PR workflow (`.github/workflows/build.yml`) but still run in the integration workflow (`.github/workflows/integration-tests.yml`). Use this marker for tests that are redundant with other tests in the same file or low-risk for PR validation.
129+
130+
```python
131+
@pytest.mark.pr_skip
132+
class TestMyRedundantFeature(TestBase):
133+
...
134+
```
135+
136+
The marker is registered in `pytest.ini`. PR workflow jobs filter with `-m "not pr_skip"`.
137+
138+
Before adding `pr_skip`, verify the test is covered by at least one job in `integration-tests.yml`.
139+
126140

127141
## Finding contributions to work on
128142
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws/aws-sam-cli/labels/help%20wanted) issues is a great place to start.

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ dependencies = [
4040
"ruamel_yaml~=0.19.1",
4141
"PyYAML~=6.0",
4242
"cookiecutter>=2.6,<2.8",
43-
"aws-sam-translator==1.108.0",
43+
"aws-sam-translator==1.109.0",
4444
# docker minor version updates can include breaking changes. Auto update micro version only.
4545
"docker~=7.1.0",
4646
"dateparser~=1.3",
47-
"requests~=2.32.5",
47+
"requests>=2.32.5,<2.34.0",
4848
"aws_lambda_builders==1.63.0",
4949
"tomlkit==0.14.0",
5050
"watchdog==4.0.2",
@@ -56,18 +56,18 @@ dependencies = [
5656
# regex is not a direct dependency of SAM CLI, exclude version 2021.10.8 due to not working on M1 Mac
5757
"regex!=2021.10.8",
5858
"tzlocal==5.3.1",
59-
"cfn-lint>=1.45,<1.48",
59+
"cfn-lint>=1.45,<1.49",
6060
"boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]>=1.41.0",
6161
"python-dotenv>=1.0,<1.3",
6262
]
6363

6464
[project.optional-dependencies]
6565
pre-dev = [
66-
"ruff==0.15.6",
66+
"ruff==0.15.8",
6767
]
6868
dev = [
6969
"aws-sam-cli[pre-dev]",
70-
"coverage==7.13.4",
70+
"coverage==7.13.5",
7171
"pytest-cov==7.1.0",
7272
"mypy==1.19.1",
7373
"types-pywin32==311.0.0.20260323",
@@ -77,11 +77,11 @@ dev = [
7777
"types-setuptools==82.0.0.20260210",
7878
"types-Pygments==2.19.0.20251121",
7979
"types-colorama==0.4.15.20250801",
80-
"types-dateparser==1.3.0.20260211",
81-
"types-docutils==0.22.3.20260316",
80+
"types-dateparser==1.4.0.20260328",
81+
"types-docutils==0.22.3.20260322",
8282
"types-jsonschema==4.26.0.20260202",
8383
"types-pyOpenSSL==24.1.0.20240722",
84-
"types-requests==2.32.4.20260107",
84+
"types-requests==2.33.0.20260327",
8585
"types-urllib3==1.26.25.14",
8686
"pytest==9.0.2",
8787
"parameterized==0.9.0",

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ markers =
2727
provided
2828
dotnet
2929
al2023: Marker to note tests that require a newer Docker version on Windows
30+
pr_skip: Tests skipped in PR workflow but run in nightly/integration tests

0 commit comments

Comments
 (0)