fix(tests): move publish templates off deprecated python3.9 - #9210
Conversation
SAR CreateApplication now rejects python3.9, failing all 8 publish integration tests. Only the publish templates are changed; the python3.9 in the validate deprecated-runtime test is deliberate.
|
Triggered the integration test suite on this branch to confirm the publish tests now pass: https://github.com/aws/aws-sam-cli/actions/runs/33446845602 ( The relevant job is Note the init failures in that same job are expected to persist here — they are fixed separately in #9206, not by this PR. On Python availability: |
Which issue(s) does this change fix?
N/A — found in the 2026-08-31 nightly (run 33379671789).
Why is this change necessary?
All 8
tests/integration/publish/test_command_integ.pytests fail because the Serverless Application Repository now refuses the runtime the test templates declare:This is a real API rejection rather than a flake, so it will keep failing every night until the templates move to a supported runtime.
How does it address the issue?
Changes
Runtime: python3.9topython3.14in the sixtests/integration/testdata/publish/templates. One line each; nothing else.Scoped deliberately:
tests/integration/validate/test_validate_command.pykeepspython3.9. That test asserts cfn-lint flags deprecated runtimes, so 3.9 is the point of it — it passed in the same run and must not be touched.python3.9in test data (start_api,invoke,buildcmdand others), but those run against local images rather than the control plane and all passed in this run —deploy,package,sync-code,sync-watchandcloud-based-testswere all green. So the rejection is currently specific to SARCreateApplication, and I have not pre-emptively churned templates that are working.What side effects does this change have?
None expected.
python3.14is already a supported runtime throughout SAM CLI (samcli/local/common/runtime_template.py,samcli/lib/utils/architecture.py,samcli/lib/build/workflow_config.py,samcli/local/docker/lambda_image.py).Verified before committing:
metadata_*.json) do not contain the runtime, andtest_command_integ.pyasserts no runtime string, so the change cannot shift an expected value.Resources.HelloWorldFunction.Properties.Runtimereadingpython3.14.make prpasses (9401 unit tests, 94.09% coverage).The publish tests themselves need AWS credentials, so they run in CI rather than locally.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.