Skip to content

Commit 6b8c62a

Browse files
Merge from aws/aws-sam-cli/develop
2 parents 2be25b7 + 9c2aecc commit 6b8c62a

450 files changed

Lines changed: 54111 additions & 1162 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.

.coveragerc_no_lang_ext

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Coverage config for `make test` which skips cfn_language_extensions tests.
2+
# Extends the base .coveragerc and also excludes the language extensions source
3+
# so coverage % isn't penalized when those tests are skipped.
4+
[run]
5+
branch = True
6+
omit =
7+
samcli/lib/cfn_language_extensions/*
8+
# Inherited from .coveragerc
9+
samcli/lib/iac/plugins_interfaces.py
10+
samcli/lib/init/templates/*
11+
samcli/hook_packages/terraform/copy_terraform_built_artifacts.py
12+
[report]
13+
exclude_lines =
14+
pragma: no cover
15+
raise NotImplementedError.*

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ updates:
2626
groups:
2727
boto:
2828
patterns:
29-
- "boto3[crt]"
29+
- "boto3"
3030
- "boto3-stubs*"
31-
- "botocore[crt]"
31+
- "botocore"
3232
- "botocore-stubs"
3333
- "mypy-boto3-*"
3434
- "types-awscrt"

.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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
100+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
169+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
170170

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

.github/workflows/build.yml

Lines changed: 6 additions & 6 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
68+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
6969
with:
7070
python-version: ${{ matrix.python }}
7171
cache-python: false
@@ -83,7 +83,7 @@ jobs:
8383
runs-on: ubuntu-latest
8484
steps:
8585
- uses: actions/checkout@v6
86-
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
86+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8787
with:
8888
python-version: "3.11"
8989
cache-python: false
@@ -158,7 +158,7 @@ jobs:
158158
mkdir "D:\\Temp"
159159
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
160160
if: ${{ matrix.os == 'windows-latest' }}
161-
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
161+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
162162
with:
163163
python-version: ${{ matrix.python }}
164164
cache-python: false
@@ -167,7 +167,7 @@ jobs:
167167
- uses: actions/setup-go@v6
168168
with:
169169
go-version: '1.19'
170-
- uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
170+
- uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1
171171
with:
172172
ruby-version: "3.3"
173173
- uses: actions/setup-node@v6
@@ -247,7 +247,7 @@ jobs:
247247
mkdir "D:\\Temp"
248248
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
249249
if: ${{ matrix.os == 'windows-latest' }}
250-
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
250+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
251251
with:
252252
python-version: ${{ matrix.python }}
253253
cache-python: false
@@ -279,7 +279,7 @@ jobs:
279279
mkdir "D:\\Temp"
280280
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
281281
if: ${{ matrix.os == 'windows-latest' }}
282-
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
282+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
283283
with:
284284
python-version: "3.10"
285285
cache-python: false

.github/workflows/integration-tests.yml

Lines changed: 8 additions & 8 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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
133+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
181+
uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # 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@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
187+
uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # 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@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
193+
uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1
194194
with:
195195
ruby-version: '3.4.7'
196196
windows-toolchain: none
@@ -202,7 +202,7 @@ 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-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
205+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
206206
with:
207207
terraform_wrapper: false
208208

@@ -243,7 +243,7 @@ jobs:
243243
echo "SAM_CLI_DEV=" >> $GITHUB_ENV
244244
245245
- name: Configure AWS credentials via OIDC
246-
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
246+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6
247247
with:
248248
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
249249
aws-region: us-east-1
@@ -451,14 +451,14 @@ jobs:
451451

452452
- name: Re-authenticate with OIDC for cleanup
453453
if: always() && env.SCRIPT_PY != ''
454-
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
454+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6
455455
with:
456456
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
457457
aws-region: us-east-1
458458

459459
- name: Assume test reporting role
460460
if: always() && env.SCRIPT_PY != ''
461-
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6
461+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6
462462
with:
463463
role-to-assume: ${{ secrets.TESTREPORTING_ARN }}
464464
aws-region: us-east-1

.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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
29+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
50+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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

Makefile

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,20 @@ init-latest-release:
2626
bash tests/install-sam-cli-binary.sh
2727

2828
test:
29-
# Run unit tests and fail if coverage falls below 94%
29+
# Run unit tests (excluding cfn_language_extensions) and fail if coverage falls below 94%
30+
@echo "NOTE: Excluding cfn_language_extensions tests. Use 'make test-all' for full coverage."
31+
pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit --ignore=tests/unit/lib/cfn_language_extensions --cov-config=.coveragerc_no_lang_ext
32+
33+
test-lang-ext:
34+
# Run cfn_language_extensions unit tests with coverage
35+
pytest --cov samcli.lib.cfn_language_extensions --cov-report term-missing --cov-fail-under 94 tests/unit/lib/cfn_language_extensions
36+
37+
test-all:
38+
# Run all unit tests including cfn_language_extensions
3039
pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit
3140

3241
test-cov-report:
33-
# Run unit tests with html coverage report
42+
# Run all unit tests with html coverage report
3443
pytest --cov samcli --cov schema --cov-report html --cov-fail-under 94 tests/unit
3544

3645
integ-test:
@@ -58,7 +67,17 @@ lint:
5867
mypy --exclude /testdata/ --exclude /init/templates/ --no-incremental setup.py samcli tests schema
5968

6069
# Command to run everytime you make changes to verify everything works
61-
dev: lint test
70+
# Runs test-all if cfn_language_extensions files changed, otherwise test
71+
dev: lint
72+
@if git diff --name-only origin/develop... 2>/dev/null | grep -qE 'cfn_language_extensions/'; then \
73+
echo "Detected cfn_language_extensions changes — running all tests"; \
74+
$(MAKE) test-all; \
75+
else \
76+
$(MAKE) test; \
77+
fi
78+
79+
# Run full verification including language extensions tests
80+
dev-all: lint test-all
6281

6382
black:
6483
black setup.py samcli tests schema
@@ -72,8 +91,8 @@ format: black
7291
schema:
7392
python -m schema.make_schema
7493

75-
# Verifications to run before sending a pull request
76-
pr: init schema black-check dev
94+
# Verifications to run before sending a pull request — runs ALL tests
95+
pr: init schema black-check lint test-all
7796

7897
# Update all reproducible requirements using uv (can run from any platform)
7998
update-reproducible-reqs:

0 commit comments

Comments
 (0)