Skip to content

Commit 2c8475a

Browse files
authored
Merge branch 'aws:develop' into move_rust_outof_experimental
2 parents c4e97c2 + 1e1664f commit 2c8475a

80 files changed

Lines changed: 2861 additions & 1283 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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ jobs:
1313
if: github.repository == 'aws/aws-sam-cli'
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Check if PR already exists
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: |
20+
PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_app_templates_hash --json id --jq length)
21+
if [ "$PR_COUNT" -ge 1 ]; then
22+
echo "PR already exists for update_app_templates_hash, skipping workflow"
23+
exit 1
24+
fi
25+
1626
- name: Checkout App Templates
1727
uses: actions/checkout@v6
1828
with:
@@ -58,6 +68,16 @@ jobs:
5868
if: github.repository == 'aws/aws-sam-cli'
5969
runs-on: ubuntu-latest
6070
steps:
71+
- name: Check if PR already exists
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: |
75+
PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_sam_transform_version --json id --jq length)
76+
if [ "$PR_COUNT" -ge 1 ]; then
77+
echo "PR already exists for update_sam_transform_version, skipping workflow"
78+
exit 1
79+
fi
80+
6181
- name: Checkout SAM
6282
uses: actions/checkout@v6
6383
with:
@@ -72,6 +92,13 @@ jobs:
7292
repository: aws/aws-sam-cli
7393
path: aws-sam-cli
7494

95+
- uses: actions/setup-python@v6
96+
with:
97+
python-version: "3.11"
98+
99+
- name: Install uv
100+
uses: astral-sh/setup-uv@v7
101+
75102
- name: Update aws-sam-translator & commit
76103
run: |
77104
git config --global user.email "action@github.com"
@@ -86,6 +113,7 @@ jobs:
86113
git reset --hard develop
87114
sed -i "s/$SAM_T_PRE_VERSION/aws-sam-translator==$SAM_T_CUR_VERSION/g" requirements/base.txt
88115
cp -r ../serverless-application-model/tests/translator/input ./tests/functional/commands/validate/lib/models
116+
make update-reproducible-reqs-uv
89117
git status
90118
git diff --quiet && exit 0 # exit if there is no change
91119
echo "is_new_sam_t=1" >> $GITHUB_ENV # set env variable for next step run decision
@@ -109,6 +137,16 @@ jobs:
109137
if: github.repository == 'aws/aws-sam-cli'
110138
runs-on: ubuntu-latest
111139
steps:
140+
- name: Check if PR already exists
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
run: |
144+
PR_COUNT=$(gh pr list --repo aws/aws-sam-cli --head update_lambda_builders_version --json id --jq length)
145+
if [ "$PR_COUNT" -ge 1 ]; then
146+
echo "PR already exists for update_lambda_builders_version, skipping workflow"
147+
exit 1
148+
fi
149+
112150
- name: Checkout Lambda Builders
113151
uses: actions/checkout@v6
114152
with:
@@ -123,6 +161,13 @@ jobs:
123161
repository: aws/aws-sam-cli
124162
path: aws-sam-cli
125163

164+
- uses: actions/setup-python@v6
165+
with:
166+
python-version: "3.11"
167+
168+
- name: Install uv
169+
uses: astral-sh/setup-uv@v7
170+
126171
- name: Upgrade aws_lambda_builders & commit
127172
run: |
128173
git config --global user.email "action@github.com"
@@ -136,6 +181,7 @@ jobs:
136181
echo "Lambda Builders pre version is $BUILDERS_PRE_VERSION"
137182
git reset --hard develop
138183
sed -i "s/$BUILDERS_PRE_VERSION/aws_lambda_builders==$BUILDERS_CUR_VERSION/g" requirements/base.txt
184+
make update-reproducible-reqs-uv
139185
git status
140186
git diff --quiet && exit 0 # exit if there is no change
141187
echo "is_new_lambda_builders=1" >> $GITHUB_ENV # set env variable for next step run decision

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,20 @@ jobs:
130130
#- "delete"
131131
#- "deploy"
132132
- 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"
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 --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"
134+
- name: "durable-functions"
135+
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"
134136
#- "list"
135137
#- "logs"
136138
#- "package"
137139
#- "publish"
138140
#- "sync"
139141
#- "traces"
140142
#- "validate"
143+
exclude:
144+
- os: windows-latest
145+
tests_config:
146+
name: "durable-functions"
141147
steps:
142148
- uses: actions/checkout@v6
143149
- name: Set TEMP to D:/Temp
@@ -197,6 +203,8 @@ jobs:
197203
run: uv pip install --system --python python3.12 --upgrade pip setuptools
198204
- name: Run integration tests for ${{ matrix.tests_config.name }}
199205
run: pytest -vv ${{ matrix.tests_config.params }}
206+
env:
207+
FORCE_RUN_DOCKER_TEST: ${{ matrix.tests_config.name == 'durable-functions' && '1' || '' }}
200208

201209
smoke-and-functional-tests:
202210
name: ${{ matrix.tests_config.name }} / ${{ matrix.tests_config.os }} / ${{ matrix.python }}

.github/workflows/integration-tests.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
CARGO_LAMBDA_VERSION: "v0.17.1"
2525
NOSE_PARAMETERIZED_NO_WARN: 1
2626
BY_CANARY: true
27-
UV_PYTHON: python3.9
27+
UV_PYTHON: python3.11
2828
CREDENTIAL_DISTRIBUTION_LAMBDA_ARN: ${{ secrets.CREDENTIAL_DISTRIBUTION_LAMBDA_ARN }}
2929
ACCOUNT_RESET_LAMBDA_ARN: ${{ secrets.ACCOUNT_RESET_LAMBDA_ARN }}
3030

@@ -51,7 +51,6 @@ jobs:
5151
- local-invoke
5252
- local-start1
5353
- local-start2
54-
- durable-functions
5554
- other-and-e2e
5655
exclude:
5756
# no-container mode only applies to build-integ test suites
@@ -67,8 +66,6 @@ jobs:
6766
test_suite: local-start1
6867
- container_runtime: no-container
6968
test_suite: local-start2
70-
- container_runtime: no-container
71-
test_suite: durable-functions
7269
- container_runtime: no-container
7370
test_suite: other-and-e2e
7471

@@ -108,7 +105,7 @@ jobs:
108105
fi
109106
110107
- name: Configure AWS credentials via OIDC
111-
uses: aws-actions/configure-aws-credentials@v5
108+
uses: aws-actions/configure-aws-credentials@v6
112109
with:
113110
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
114111
aws-region: us-east-1
@@ -139,7 +136,7 @@ jobs:
139136

140137
- name: Set up Go
141138
if: contains(fromJSON('["build-integ", "build-integ-java-python-provided", "build-integ-arm64"]'), matrix.test_suite) && matrix.container_runtime == 'no-container'
142-
uses: actions/setup-go@v5
139+
uses: actions/setup-go@v6
143140
with:
144141
go-version: '1.25'
145142

@@ -297,33 +294,52 @@ jobs:
297294
- name: Get testing resources and credentials
298295
run: |
299296
# Try with skip_role_deletion parameter first
300-
test_env_var=$(python3.9 tests/get_testing_resources.py skip_role_deletion)
297+
test_env_var=$(python3.11 tests/get_testing_resources.py skip_role_deletion)
301298
302299
if [ $? -ne 0 ]; then
303300
echo "First attempt with skip_role_deletion failed, trying without parameter..."
304-
test_env_var=$(python3.9 tests/get_testing_resources.py)
301+
test_env_var=$(python3.11 tests/get_testing_resources.py)
305302
306303
if [ $? -ne 0 ]; then
307304
echo "get_testing_resources failed. Failed to acquire credentials or test resources."
308305
exit 1
309306
fi
310307
fi
311308
312-
# Save current credentials for account reset later
309+
# Save current credentials for account reset later (mask them first)
310+
echo "::add-mask::$AWS_ACCESS_KEY_ID"
311+
echo "::add-mask::$AWS_SECRET_ACCESS_KEY"
312+
echo "::add-mask::$AWS_SESSION_TOKEN"
313313
echo "CI_ACCESS_ROLE_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> $GITHUB_ENV
314314
echo "CI_ACCESS_ROLE_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> $GITHUB_ENV
315315
echo "CI_ACCESS_ROLE_AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN" >> $GITHUB_ENV
316316
317-
# Set test credentials
318-
echo "AWS_ACCESS_KEY_ID=$(echo "$test_env_var" | jq -j ".accessKeyID")" >> $GITHUB_ENV
319-
echo "AWS_SECRET_ACCESS_KEY=$(echo "$test_env_var" | jq -j ".secretAccessKey")" >> $GITHUB_ENV
320-
echo "AWS_SESSION_TOKEN=$(echo "$test_env_var" | jq -j ".sessionToken")" >> $GITHUB_ENV
321-
echo "TASK_TOKEN=$(echo "$test_env_var" | jq -j ".taskToken")" >> $GITHUB_ENV
317+
# Extract test credentials and mask them before setting as env vars
318+
TEST_ACCESS_KEY_ID=$(echo "$test_env_var" | jq -j ".accessKeyID")
319+
TEST_SECRET_ACCESS_KEY=$(echo "$test_env_var" | jq -j ".secretAccessKey")
320+
TEST_SESSION_TOKEN=$(echo "$test_env_var" | jq -j ".sessionToken")
321+
TEST_TASK_TOKEN=$(echo "$test_env_var" | jq -j ".taskToken")
322+
323+
# Mask sensitive credentials so they don't appear in logs
324+
echo "::add-mask::$TEST_ACCESS_KEY_ID"
325+
echo "::add-mask::$TEST_SECRET_ACCESS_KEY"
326+
echo "::add-mask::$TEST_SESSION_TOKEN"
327+
echo "::add-mask::$TEST_TASK_TOKEN"
328+
329+
# Set test credentials as environment variables
330+
echo "AWS_ACCESS_KEY_ID=$TEST_ACCESS_KEY_ID" >> $GITHUB_ENV
331+
echo "AWS_SECRET_ACCESS_KEY=$TEST_SECRET_ACCESS_KEY" >> $GITHUB_ENV
332+
echo "AWS_SESSION_TOKEN=$TEST_SESSION_TOKEN" >> $GITHUB_ENV
333+
echo "TASK_TOKEN=$TEST_TASK_TOKEN" >> $GITHUB_ENV
334+
335+
# Set other test resources (non-sensitive)
322336
echo "AWS_S3_TESTING=$(echo "$test_env_var" | jq -j ".TestBucketName")" >> $GITHUB_ENV
323337
echo "AWS_ECR_TESTING=$(echo "$test_env_var" | jq -j ".TestECRURI")" >> $GITHUB_ENV
324338
echo "AWS_KMS_KEY=$(echo "$test_env_var" | jq -j ".TestKMSKeyArn")" >> $GITHUB_ENV
325339
echo "AWS_SIGNING_PROFILE_NAME=$(echo "$test_env_var" | jq -j ".TestSigningProfileName")" >> $GITHUB_ENV
326340
echo "AWS_SIGNING_PROFILE_VERSION_ARN=$(echo "$test_env_var" | jq -j ".TestSigningProfileARN")" >> $GITHUB_ENV
341+
echo "LMI_SUBNET_ID=$(echo "$test_env_var" | jq -j ".LMISubnetId")" >> $GITHUB_ENV
342+
echo "LMI_SECURITY_GROUP_ID=$(echo "$test_env_var" | jq -j ".LMISecurityGroupId")" >> $GITHUB_ENV
327343
328344
- name: Login to Public ECR
329345
if: matrix.container_runtime != 'no-container' && env.BY_CANARY == 'true'
@@ -368,13 +384,13 @@ jobs:
368384
pytest -vv -n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py -m 'java' -k "${CONTAINER_FILTER}" --json-report --json-report-file=TEST_REPORT-integration-buildcmd-arm64-java-${{ matrix.container_runtime }}.json
369385
;;
370386
"terraform-build")
371-
pytest -vv -n 4 --reruns 4 tests/integration/buildcmd/test_build_terraform_applications.py tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-terraform-${{ matrix.container_runtime }}.json
387+
pytest -vv -n 4 --reruns 3 tests/integration/buildcmd/test_build_terraform_applications.py tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-terraform-${{ matrix.container_runtime }}.json
372388
;;
373389
"package-delete-deploy")
374390
pytest -vv tests/integration/package tests/integration/delete tests/integration/deploy --dist=loadgroup -n 6 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package-delete-deploy-${{ matrix.container_runtime }}.json
375391
;;
376392
"sync")
377-
pytest -vv tests/integration/sync -n 6 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync-${{ matrix.container_runtime }}.json
393+
pytest -vv tests/integration/sync -n 4 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync-${{ matrix.container_runtime }}.json
378394
;;
379395
"local-invoke")
380396
pytest -vv --reruns 3 tests/integration/local/invoke tests/integration/local/generate_event --ignore tests/integration/local/invoke/test_invoke_durable.py --json-report --json-report-file=TEST_REPORT-integration-local-invoke-${{ matrix.container_runtime }}.json
@@ -383,14 +399,10 @@ jobs:
383399
pytest -vv --reruns 3 tests/integration/local/start_api --ignore tests/integration/local/start_api/test_start_api_with_terraform_application.py --ignore tests/integration/local/start_api/test_start_api_durable.py --json-report --json-report-file=TEST_REPORT-integration-local-start1-${{ matrix.container_runtime }}.json
384400
;;
385401
"local-start2")
386-
pytest -vv --reruns 3 tests/integration/local/start_lambda tests/integration/local/start_api/test_start_api_with_terraform_application.py --ignore tests/integration/local/start_lambda/test_start_lambda_durable.py --json-report --json-report-file=TEST_REPORT-integration-local-start2-${{ matrix.container_runtime }}.json
387-
;;
388-
"durable-functions")
389-
pytest -vv --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 tests/integration/local/callback/test_callback.py tests/integration/local/execution/test_execution.py --json-report --json-report-file=TEST_REPORT-integration-durable-functions-${{ matrix.container_runtime }}.json
402+
pytest -vv --reruns 3 tests/integration/local/start_lambda tests/integration/local/start_api/test_start_api_with_terraform_application.py tests/integration/local/callback/test_callback.py tests/integration/local/execution/test_execution.py --ignore tests/integration/local/start_lambda/test_start_lambda_durable.py --json-report --json-report-file=TEST_REPORT-integration-local-start2-${{ matrix.container_runtime }}.json
390403
;;
391404
"other-and-e2e")
392-
pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration tests/end_to_end --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others-${{ matrix.container_runtime }}.json
393-
pytest -vv --reruns 3 tests/regression --json-report --json-report-file=TEST_REPORT-regression-${{ matrix.container_runtime }}.json
405+
pytest -vv -n 4 --reruns 3 --dist loadgroup tests/integration tests/end_to_end tests/regression --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others-${{ matrix.container_runtime }}.json
394406
;;
395407
esac
396408

.github/workflows/notify-slack.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Slack Notifications
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
issues:
7+
types: [opened]
8+
9+
jobs:
10+
notify-slack:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Wait for label to be applied
16+
run: sleep 10s
17+
shell: bash
18+
- name: Send External PR Notification
19+
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pr/external')
20+
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
21+
env:
22+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
23+
SLACK_TITLE: 'PR Created: ${{ github.event.pull_request.title }} by ${{ github.event.pull_request.user.login }}'
24+
SLACK_FOOTER: ''
25+
MSG_MINIMAL: true
26+
SLACK_MESSAGE: '${{ github.event.pull_request.html_url }}'
27+
- name: Send New Issue Notification
28+
if: github.event_name == 'issue'
29+
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
30+
env:
31+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
32+
SLACK_TITLE: 'Issue Created: ${{ github.event.issue.title }} by ${{ github.event.issue.user.login }}'
33+
SLACK_FOOTER: ''
34+
MSG_MINIMAL: true
35+
SLACK_MESSAGE: '${{ github.event.issue.html_url }}'

.github/workflows/update-reproducibles.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,23 @@ jobs:
1515
pull-requests: write
1616
contents: write
1717
if: github.repository_owner == 'aws'
18-
strategy:
19-
matrix:
20-
include:
21-
- os: ubuntu-latest
22-
python: 3.11
23-
target: update-reproducible-linux-reqs
24-
- os: macos-latest
25-
python: 3.11
26-
target: update-reproducible-mac-reqs
27-
- os: windows-latest
28-
python: 3.12
29-
target: update-reproducible-win-reqs
30-
max-parallel: 1
31-
runs-on: ${{ matrix.os }}
18+
runs-on: ubuntu-latest
3219
steps:
3320
- uses: actions/checkout@v6
3421
with:
3522
ref: ${{ github.head_ref }}
3623
- uses: actions/setup-python@v6
3724
with:
38-
python-version: ${{ matrix.python }}
39-
- run: make ${{ matrix.target }}
25+
python-version: "3.11"
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v7
28+
- name: Update all reproducible requirements
29+
run: make update-reproducible-reqs-uv
4030
- name: Push changes
4131
run: |
4232
git config --global user.email "action@github.com"
4333
git config --global user.name "GitHub Action"
4434
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
45-
git commit -am "Update reproducibles: ${{ matrix.target }}" || echo "nothing to commit"
35+
git add requirements/reproducible-*.txt
36+
git commit -m "Update reproducible requirements" || echo "nothing to commit"
4637
git push

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ cov.xml
407407
coverage.xml
408408

409409
# Temporary scratch directory used by the tests
410+
tests/integration/*/tmp/*
410411
tests/integration/buildcmd/scratch
411412
tests/integration/testdata/buildcmd/Dotnet*/bin
412413
tests/integration/testdata/buildcmd/Dotnet*/obj
@@ -425,4 +426,4 @@ samcli/lib/init/templates/cookiecutter-aws-sam-hello-java-gradle/**/.gradle/
425426
mise.toml
426427

427428
# Durable executions
428-
**/.durable-executions-local/
429+
**/.durable-executions-local/

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,10 @@ update-reproducible-win-reqs:
8787

8888

8989
update-reproducible-reqs: update-reproducible-linux-reqs update-reproducible-mac-reqs
90+
91+
# Update all reproducible requirements using uv (can run from any platform)
92+
update-reproducible-reqs-uv:
93+
@command -v uv >/dev/null 2>&1 || pip install uv
94+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-linux.txt --python-platform linux --python-version 3.11 --no-cache --no-strip-extras
95+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-mac.txt --python-platform macos --python-version 3.11 --no-cache --no-strip-extras
96+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-win.txt --python-platform windows --python-version 3.12 --no-cache --no-strip-extras

0 commit comments

Comments
 (0)