Skip to content

Commit 7962c4e

Browse files
Merge from aws/aws-sam-cli/develop
2 parents ff4caec + 550ee2a commit 7962c4e

File tree

151 files changed

+11457
-2370
lines changed

Some content is hidden

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

151 files changed

+11457
-2370
lines changed

.github/workflows/build.yml

Lines changed: 65 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,17 @@ jobs:
5858
- "3.9"
5959
- "3.11"
6060
steps:
61+
# This allows temp file creation on drive D, which won't trigger windows defender scan and leads to faster IO
62+
- name: Set TEMP to D:/Temp
63+
run: |
64+
mkdir "D:\\Temp"
65+
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
66+
if: ${{ matrix.os == 'windows-latest' }}
6167
- uses: actions/checkout@v5
6268
- uses: actions/setup-python@v6
6369
with:
6470
python-version: ${{ matrix.python }}
6571
- run: test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
66-
- run: make init
6772
- run: make pr
6873

6974
validate-schema:
@@ -90,7 +95,7 @@ jobs:
9095
shell: bash
9196
9297
integration-tests:
93-
name: Integ / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_config }}
98+
name: Integ / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_config.name }}
9499
if: github.repository_owner == 'aws'
95100
runs-on: ${{ matrix.os }}
96101
env:
@@ -114,25 +119,32 @@ jobs:
114119
- "3.11"
115120
# folders that is commented below requires credentials, no need to spare time to run them
116121
tests_config:
117-
- "-n 2 --reruns 3 tests/integration/buildcmd"
122+
- name: "integ-buildcmd-arm64"
123+
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py"
124+
- name: "integ-buildcmd-main"
125+
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"
126+
- name: "integ-buildcmd-java"
127+
params: "-n 2 --reruns 5 tests/integration/buildcmd/test_build_cmd_java.py"
128+
- name: "integ-buildcmd-other"
129+
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"
118130
#- "delete"
119131
#- "deploy"
120-
- "tests/integration/init"
132+
- name: "integ-all-other"
133+
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"
121134
#- "list"
122-
- "tests/integration/local"
123135
#- "logs"
124136
#- "package"
125-
- "tests/integration/pipeline"
126137
#- "publish"
127-
- "tests/integration/root"
128-
- "tests/integration/scripts"
129138
#- "sync"
130-
- "tests/integration/telemetry"
131139
#- "traces"
132140
#- "validate"
133-
- "tests/integration/docs"
134141
steps:
135142
- uses: actions/checkout@v5
143+
- name: Set TEMP to D:/Temp
144+
run: |
145+
mkdir "D:\\Temp"
146+
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
147+
if: ${{ matrix.os == 'windows-latest' }}
136148
- uses: actions/setup-python@v6
137149
with:
138150
# set last version as the one in matrix to make it default
@@ -143,6 +155,7 @@ jobs:
143155
3.12
144156
3.13
145157
${{ matrix.python }}
158+
cache: 'pip'
146159
- uses: actions/setup-go@v6
147160
with:
148161
go-version: '1.19'
@@ -173,29 +186,17 @@ jobs:
173186
rustup default stable
174187
pip install cargo-lambda==$CARGO_LAMBDA_VERSION
175188
echo "$HOME/.local/bin" >> $GITHUB_PATH
176-
177-
- name: Upgrade pip in Python3.12 (Linux)
178-
run: |
179-
python3.12 -m pip install pip --upgrade
180-
python3.12 -m pip install setuptools --upgrade
181-
if: ${{ matrix.os == 'ubuntu-latest' }}
182-
183-
- name: Upgrade pip in Python3.12 (Windows)
184-
run: |
185-
py -3.12 -m pip install pip --upgrade
186-
py -3.12 -m pip install setuptools --upgrade
187-
if: ${{ matrix.os == 'windows-latest' }}
188-
189-
190189
- name: Init samdev
191190
run: make init
192-
- name: Run integration tests for ${{ matrix.tests_config }}
193-
run: pytest -vv ${{ matrix.tests_config }}
191+
- name: uv install setuptools in Python3.12
192+
run: uv pip install --system --python python3.12 --upgrade pip setuptools
193+
- name: Run integration tests for ${{ matrix.tests_config.name }}
194+
run: pytest -vv ${{ matrix.tests_config.params }}
194195

195196
smoke-and-functional-tests:
196-
name: Functional & Smoke Tests / ${{ matrix.os }} / ${{ matrix.python }}
197+
name: ${{ matrix.tests_config.name }} / ${{ matrix.tests_config.os }} / ${{ matrix.python }}
197198
if: github.repository_owner == 'aws'
198-
runs-on: ${{ matrix.os }}
199+
runs-on: ${{ matrix.tests_config.os }}
199200
env:
200201
AWS_DEFAULT_REGION: us-east-1
201202
SAM_CLI_DEV: "1"
@@ -206,21 +207,43 @@ jobs:
206207
strategy:
207208
fail-fast: false
208209
matrix:
209-
os:
210-
- ubuntu-latest
211-
- windows-latest
212210
python:
213211
- "3.9"
214212
- "3.11"
213+
tests_config:
214+
- name: "Smoke & Functional Tests - All"
215+
os: ubuntu-latest
216+
params: "-n 4 tests/smoke tests/functional"
217+
env_vars: "all"
218+
- name: "Smoke Tests - First Third"
219+
os: windows-latest
220+
params: "-n 4 tests/smoke"
221+
env_vars: "first-third"
222+
- name: "Smoke Tests - Second Third"
223+
os: windows-latest
224+
params: "-n 4 tests/smoke"
225+
env_vars: "second-third"
226+
- name: "Smoke Tests - Third Third & Functional Tests"
227+
os: windows-latest
228+
params: "-n 4 tests/smoke tests/functional"
229+
env_vars: "third-third"
215230
steps:
216231
- uses: actions/checkout@v5
232+
- name: Set TEMP to D:/Temp
233+
run: |
234+
mkdir "D:\\Temp"
235+
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
236+
if: ${{ matrix.os == 'windows-latest' }}
217237
- uses: actions/setup-python@v6
218238
with:
219239
python-version: ${{ matrix.python }}
240+
cache: 'pip'
220241
- name: Init samdev
221242
run: make init
222-
- name: Run functional & smoke tests
223-
run: pytest -vv -n 4 tests/functional tests/smoke
243+
- name: Run ${{ matrix.tests_config.name }}
244+
run: pytest -vv ${{ matrix.tests_config.params }}
245+
env:
246+
SMOKE_TEST_SUBSET: ${{ matrix.tests_config.env_vars }}
224247

225248
docker-disabled:
226249
name: Docker-disabled Tests / ${{ matrix.os }}
@@ -236,6 +259,11 @@ jobs:
236259
- windows-latest
237260
steps:
238261
- uses: actions/checkout@v5
262+
- name: Set TEMP to D:/Temp
263+
run: |
264+
mkdir "D:\\Temp"
265+
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
266+
if: ${{ matrix.os == 'windows-latest' }}
239267
- uses: actions/setup-python@v6
240268
with:
241269
# These are the versions of Python that correspond to the supported Lambda runtimes
@@ -255,24 +283,16 @@ jobs:
255283
if: ${{ matrix.os == 'windows-latest' }}
256284
shell: pwsh
257285
run: stop-service docker
258-
- name: Upgrade pip in Python3.12 (Linux)
259-
run: |
260-
python3.12 -m pip install pip --upgrade
261-
python3.12 -m pip install setuptools --upgrade
262-
if: ${{ matrix.os == 'ubuntu-latest' }}
263-
- name: Upgrade pip in Python3.12 (Windows)
264-
run: |
265-
py -3.12 -m pip install pip --upgrade
266-
py -3.12 -m pip install setuptools --upgrade
267-
if: ${{ matrix.os == 'windows-latest' }}
286+
- name: Init samdev
287+
run: make init
288+
- name: uv install setuptools in Python3.12
289+
run: uv pip install --system --python python3.12 --upgrade pip setuptools
268290
- name: Check Docker not Running
269291
run: docker info
270292
id: run-docker-info
271293
continue-on-error: true
272294
- name: Report failure
273295
if: steps.run-docker-info.outcome == 'success'
274296
run: exit 1
275-
- name: Init samdev
276-
run: make init
277297
- name: Run tests without Docker
278298
run: pytest -vv tests/integration/buildcmd/test_build_cmd_python.py -k TestBuildCommand_PythonFunctions_WithoutDocker

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@v3
49+
uses: github/codeql-action/init@v4
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -60,7 +60,7 @@ jobs:
6060
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
6161
# If this step fails, then you should remove it and run the build manually (see below)
6262
- name: Autobuild
63-
uses: github/codeql-action/autobuild@v3
63+
uses: github/codeql-action/autobuild@v4
6464

6565
# ℹ️ Command-line programs to run using the OS shell.
6666
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -73,6 +73,6 @@ jobs:
7373
# ./location_of_script_within_repo/buildscript.sh
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
uses: github/codeql-action/analyze@v4
7777
with:
7878
category: "/language:${{matrix.language}}"

.github/workflows/pr-labeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
'aws-sam-cli-bot',
2828
'seshubaws', 'valerena',
2929
'Vandita2020', 'roger-zhangg',
30-
'mbfreder', 'vicheey', 'rachdry', 'dependabot[bot]'
30+
'vicheey', 'bnusunny', 'tobixlea',
31+
'reedham-aws', 'licjun', 'dependabot[bot]'
3132
]
3233
if (maintainers.includes(context.payload.sender.login)) {
3334
github.rest.issues.addLabels({

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,3 +423,4 @@ tests/integration/testdata/sync/code/before/dotnet_function/src/HelloWorld/obj/
423423
# Installer build folder
424424
.build
425425

426+
.kiro

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ SAM_CLI_TELEMETRY ?= 0
44

55
.PHONY: schema
66

7+
# Initialize environment specifically for Github action tests using uv
78
init:
8-
SAM_CLI_DEV=1 pip install -e '.[dev]'
9+
@if [ "$$GITHUB_ACTIONS" = "true" ]; then \
10+
pip install uv==0.9.1 && SAM_CLI_DEV=1 uv pip install --system -e '.[dev]'; \
11+
else \
12+
SAM_CLI_DEV=1 pip install -e '.[dev]'; \
13+
fi
914

1015
test:
1116
# Run unit tests
@@ -56,7 +61,7 @@ schema:
5661
python -m schema.make_schema
5762

5863
# Verifications to run before sending a pull request
59-
pr: init dev schema black-check
64+
pr: init schema black-check dev
6065

6166
# lucashuy: Linux and MacOS are on the same Python version,
6267
# however we should follow up in a different change

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ We think you'll like the code base. Clone it and run `make pr` or `./Make -pr` o
7171
## Contribute to SAM
7272

7373
We love our contributors ❤️ We have over 100 contributors who have built various parts of the product.
74-
Read this [testimonial from @ndobryanskyy](https://www.lohika.com/aws-sam-my-exciting-first-open-source-experience/) to learn
74+
Read this [testimonial from @ndobryanskyy](https://www.awsadvent.com/2018/12/10/aws-sam-my-exciting-first-open-source-experience/) to learn
7575
more about what it was like contributing to SAM.
7676

7777
Depending on your interest and skill, you can help build the different parts of the SAM project;

0 commit comments

Comments
 (0)