Skip to content

Commit 8836502

Browse files
authored
Merge branch 'develop' into fix-8148
2 parents 0dc55b9 + 8e5cc6d commit 8836502

334 files changed

Lines changed: 7324 additions & 3740 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/dependabot.yml

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ updates:
1313
open-pull-requests-limit: 10
1414

1515
- package-ecosystem: "pip"
16-
directory: "/requirements"
16+
directory: "/"
1717
schedule:
1818
interval: "daily"
1919
target-branch: "develop"
@@ -26,14 +26,13 @@ updates:
2626
groups:
2727
boto:
2828
patterns:
29-
- "boto3"
29+
- "boto3[crt]"
3030
- "boto3-stubs*"
31-
- "botocore"
31+
- "botocore[crt]"
3232
- "botocore-stubs"
3333
- "mypy-boto3-*"
34-
types:
35-
patterns:
36-
- "types-*"
34+
- "types-awscrt"
35+
- "types-s3transfer"
3736
pytest:
3837
patterns:
3938
- "pytest-*"
@@ -42,13 +41,78 @@ updates:
4241
# as of writing this
4342
- "pytest-metadata"
4443
- "pytest-json-report"
44+
cookiecutter:
45+
patterns:
46+
- "cookiecutter"
47+
- "arrow"
48+
- "binaryornot"
49+
- "chardet"
50+
- "python-slugify"
51+
- "text-unidecode"
52+
flask:
53+
patterns:
54+
- "flask"
55+
- "blinker"
56+
- "werkzeug"
57+
- "itsdangerous"
58+
cfn-lint:
59+
patterns:
60+
- "cfn-lint"
61+
- "networkx"
62+
- "sympy"
63+
- "mpmath"
64+
- "jsonpatch"
65+
- "jsonpointer"
66+
cryptography:
67+
patterns:
68+
- "cryptography"
69+
- "pyopenssl"
70+
- "cffi"
71+
- "pycparser"
72+
requests:
73+
patterns:
74+
- "requests"
75+
- "certifi"
76+
- "charset-normalizer"
77+
- "idna"
78+
- "urllib3"
79+
rich:
80+
patterns:
81+
- "rich"
82+
- "markdown-it-py"
83+
- "mdurl"
84+
- "pygments"
85+
jsonschema:
86+
patterns:
87+
- "jsonschema"
88+
- "jsonschema-specifications"
89+
- "referencing"
90+
- "attrs"
91+
- "rpds-py"
92+
pydantic:
93+
patterns:
94+
- "pydantic"
95+
- "pydantic-core"
96+
- "annotated-types"
97+
- "typing-inspection"
98+
jinja2:
99+
patterns:
100+
- "jinja2"
101+
- "markupsafe"
102+
pyyaml:
103+
patterns:
104+
- "pyyaml"
105+
- "ruamel-yaml"
45106
ignore:
46107
# Ignored intentionally since we have a GHA that updates to more
47108
# completely
48109
- dependency-name: "aws-sam-translator"
49110
# Ignored intentionally since we have a GHA that updates to more
50111
# completely
51112
- dependency-name: "aws_lambda_builders"
113+
# Ignored intentionally since watchdog v5+ breaks sync watch
114+
# file change detection; pinned to 4.0.2
115+
- dependency-name: "watchdog"
52116
# The dependencies are intentionally pinned to certain
53117
# version ranges for specific Python versions
54118
- dependency-name: "flake8"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: AI Code Review
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Checkout base branch (trusted) — workspace files are never from the fork
16+
- uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 0
19+
20+
# Fetch PR head commit so git diff works, but don't checkout fork files
21+
- name: Fetch PR head
22+
run: git fetch origin "$PR_HEAD_SHA"
23+
env:
24+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
25+
26+
- uses: roger-zhangg/sam-pr-reviewer@793976165e969a6ccb6ace13d35811c02471f471 # v1
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
kiro_api_key: ${{ secrets.KIRO_API_KEY }}

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

Lines changed: 8 additions & 8 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: |
@@ -108,12 +108,12 @@ jobs:
108108
echo "SAM-T cur version is $SAM_T_CUR_VERSION"
109109
cd ../aws-sam-cli
110110
git checkout -b update_sam_transform_version
111-
SAM_T_PRE_VERSION=$(grep "aws-sam-translator=" requirements/base.txt)
111+
SAM_T_PRE_VERSION=$(grep -oP 'aws-sam-translator==\K[0-9.]+' pyproject.toml)
112112
echo "SAM-T pre version is $SAM_T_PRE_VERSION"
113113
git reset --hard develop
114-
sed -i "s/$SAM_T_PRE_VERSION/aws-sam-translator==$SAM_T_CUR_VERSION/g" requirements/base.txt
114+
sed -i "s/aws-sam-translator==$SAM_T_PRE_VERSION/aws-sam-translator==$SAM_T_CUR_VERSION/g" pyproject.toml
115115
cp -r ../serverless-application-model/tests/translator/input ./tests/functional/commands/validate/lib/models
116-
make update-reproducible-reqs-uv
116+
make update-reproducible-reqs
117117
git status
118118
git diff --quiet && exit 0 # exit if there is no change
119119
echo "is_new_sam_t=1" >> $GITHUB_ENV # set env variable for next step run decision
@@ -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: |
@@ -177,11 +177,11 @@ jobs:
177177
echo "Lambda Builders cur version is $BUILDERS_CUR_VERSION"
178178
cd ../aws-sam-cli
179179
git checkout -b update_lambda_builders_version
180-
BUILDERS_PRE_VERSION=$(grep "aws_lambda_builders=" requirements/base.txt)
180+
BUILDERS_PRE_VERSION=$(grep -oP 'aws_lambda_builders==\K[0-9.]+' pyproject.toml)
181181
echo "Lambda Builders pre version is $BUILDERS_PRE_VERSION"
182182
git reset --hard develop
183-
sed -i "s/$BUILDERS_PRE_VERSION/aws_lambda_builders==$BUILDERS_CUR_VERSION/g" requirements/base.txt
184-
make update-reproducible-reqs-uv
183+
sed -i "s/aws_lambda_builders==$BUILDERS_PRE_VERSION/aws_lambda_builders==$BUILDERS_CUR_VERSION/g" pyproject.toml
184+
make update-reproducible-reqs
185185
git status
186186
git diff --quiet && exit 0 # exit if there is no change
187187
echo "is_new_lambda_builders=1" >> $GITHUB_ENV # set env variable for next step run decision

.github/workflows/build.yml

Lines changed: 55 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- ubuntu-latest
5656
- windows-latest
5757
python:
58-
- "3.9"
58+
- "3.10"
5959
- "3.11"
6060
steps:
6161
# This allows temp file creation on drive D, which won't trigger windows defender scan and leads to faster IO
@@ -65,26 +65,30 @@ jobs:
6565
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
6666
if: ${{ matrix.os == 'windows-latest' }}
6767
- uses: actions/checkout@v6
68-
- uses: actions/setup-python@v6
68+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
6969
with:
7070
python-version: ${{ matrix.python }}
71-
- uses: astral-sh/setup-uv@v7
71+
cache-python: false
72+
- name: Install and activate Python
73+
run: bash tests/setup-python-uv.sh ${{ matrix.python }}
74+
shell: bash
7275
- run: test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
7376
- run: make pr
7477

7578
validate-schema:
7679
name: Validate JSON schema
7780
if: github.repository_owner == 'aws'
7881
permissions:
79-
pull-requests: write
80-
contents: write
82+
contents: read
8183
runs-on: ubuntu-latest
8284
steps:
8385
- uses: actions/checkout@v6
84-
- uses: actions/setup-python@v6
85-
name: Install Python 3.11
86+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
8687
with:
87-
python-version: 3.11
88+
python-version: "3.11"
89+
cache-python: false
90+
- name: Install and activate Python
91+
run: bash tests/setup-python-uv.sh 3.11
8892
- run: make init
8993
- run: |
9094
diff <( cat schema/samcli.json ) <( python -m schema.make_schema && cat schema/samcli.json ) && \
@@ -116,22 +120,24 @@ jobs:
116120
- ubuntu-latest
117121
- windows-latest
118122
python:
119-
- "3.9"
123+
- "3.10"
120124
- "3.11"
121125
# folders that is commented below requires credentials, no need to spare time to run them
122126
tests_config:
123127
- name: "integ-buildcmd-arm64"
124-
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"
125131
- name: "integ-buildcmd-main"
126-
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"
127133
- name: "integ-buildcmd-java"
128-
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"
129135
- name: "integ-buildcmd-other"
130136
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"
131137
#- "delete"
132138
#- "deploy"
133139
- name: "integ-all-other"
134-
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"
135141
- name: "durable-functions"
136142
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"
137143
#- "list"
@@ -152,22 +158,16 @@ jobs:
152158
mkdir "D:\\Temp"
153159
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
154160
if: ${{ matrix.os == 'windows-latest' }}
155-
- uses: actions/setup-python@v6
161+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
156162
with:
157-
# set last version as the one in matrix to make it default
158-
python-version: |
159-
3.9
160-
3.10
161-
3.11
162-
3.12
163-
3.13
164-
3.14
165-
${{ matrix.python }}
166-
cache: 'pip'
163+
python-version: ${{ matrix.python }}
164+
cache-python: false
165+
- name: Install Python versions
166+
run: bash tests/setup-python-uv.sh 3.9 3.10 3.11 3.12 3.13 3.14 ${{ matrix.python }}
167167
- uses: actions/setup-go@v6
168168
with:
169169
go-version: '1.19'
170-
- uses: ruby/setup-ruby@v1
170+
- uses: ruby/setup-ruby@4dc28cf14d77b0afa6832d9765ac422dbf0dfedd # v1
171171
with:
172172
ruby-version: "3.3"
173173
- uses: actions/setup-node@v6
@@ -188,11 +188,11 @@ jobs:
188188
# Install and configure Rust & Cargo Lambda
189189
- name: Install Rust toolchain and cargo-lambda
190190
if: ${{ matrix.os == 'ubuntu-latest' }}
191-
run: bash tests/install-rust.sh
191+
run: bash tests/install-rust.sh --uv
192192
- name: Init samdev
193193
run: make init
194194
- name: uv install setuptools in Python3.12
195-
run: uv pip install --system --python python3.12 --upgrade pip setuptools
195+
run: uv pip install --break-system-packages --python "$(uv python find 3.12)" --upgrade pip setuptools
196196
- name: Run integration tests for ${{ matrix.tests_config.name }}
197197
run: pytest -vv ${{ matrix.tests_config.params }}
198198
env:
@@ -213,36 +213,46 @@ jobs:
213213
fail-fast: false
214214
matrix:
215215
python:
216-
- "3.9"
216+
- "3.10"
217217
- "3.11"
218218
tests_config:
219-
- 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"
220224
os: ubuntu-latest
221225
params: "-n 4 tests/smoke tests/functional"
222-
env_vars: "all"
223-
- name: "Smoke Tests - First Third"
226+
env_vars: "second-half"
227+
- name: "Smoke Tests - First Quarter"
224228
os: windows-latest
225229
params: "-n 4 tests/smoke"
226-
env_vars: "first-third"
227-
- name: "Smoke Tests - Second Third"
230+
env_vars: "first-quarter"
231+
- name: "Smoke Tests - Second Quarter"
228232
os: windows-latest
229233
params: "-n 4 tests/smoke"
230-
env_vars: "second-third"
231-
- name: "Smoke Tests - Third Third & Functional Tests"
234+
env_vars: "second-quarter"
235+
- name: "Smoke Tests - Third Quarter"
236+
os: windows-latest
237+
params: "-n 4 tests/smoke"
238+
env_vars: "third-quarter"
239+
- name: "Smoke Tests - Fourth Quarter & Functional Tests"
232240
os: windows-latest
233241
params: "-n 4 tests/smoke tests/functional"
234-
env_vars: "third-third"
242+
env_vars: "fourth-quarter"
235243
steps:
236244
- uses: actions/checkout@v6
237245
- name: Set TEMP to D:/Temp
238246
run: |
239247
mkdir "D:\\Temp"
240248
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
241249
if: ${{ matrix.os == 'windows-latest' }}
242-
- uses: actions/setup-python@v6
250+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
243251
with:
244252
python-version: ${{ matrix.python }}
245-
cache: 'pip'
253+
cache-python: false
254+
- name: Install and activate Python
255+
run: bash tests/setup-python-uv.sh ${{ matrix.python }}
246256
- name: Init samdev
247257
run: make init
248258
- name: Run ${{ matrix.tests_config.name }}
@@ -269,16 +279,13 @@ jobs:
269279
mkdir "D:\\Temp"
270280
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
271281
if: ${{ matrix.os == 'windows-latest' }}
272-
- uses: actions/setup-python@v6
282+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
273283
with:
274-
# These are the versions of Python that correspond to the supported Lambda runtimes
275-
python-version: |
276-
3.14
277-
3.9
278-
3.10
279-
3.11
280-
3.12
281-
3.13
284+
python-version: "3.10"
285+
cache-python: false
286+
- name: Install Python versions
287+
shell: bash
288+
run: bash tests/setup-python-uv.sh 3.9 3.10 3.11 3.12 3.13 3.14
282289
- name: Stop Docker Linux
283290
if: ${{ matrix.os == 'ubuntu-latest' }}
284291
run: |
@@ -292,7 +299,7 @@ jobs:
292299
- name: Init samdev
293300
run: make init
294301
- name: uv install setuptools in Python3.12
295-
run: uv pip install --system --python python3.12 --upgrade pip setuptools
302+
run: uv pip install --break-system-packages --python "$(uv python find 3.12)" --upgrade pip setuptools
296303
- name: Check Docker not Running
297304
run: docker info
298305
id: run-docker-info

0 commit comments

Comments
 (0)