test(aws_lambda): Remove aws-sam-cli dependency#5462
test(aws_lambda): Remove aws-sam-cli dependency#5462alexander-alderman-webb merged 4 commits intoivana/test-ci-codecovfrom
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 6.71s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 13668 uncovered lines. Files with missing lines (180)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 22.82% 30.85% +8.03%
==========================================
Files 188 189 +1
Lines 19532 19765 +233
Branches 7120 6408 -712
==========================================
+ Hits 4458 6097 +1639
- Misses 15074 13668 -1406
- Partials 378 467 +89Generated by Codecov Action |
2103b16
into
ivana/test-ci-codecov
| # AWS Lambda | ||
| aws_lambda: aws-cdk-lib | ||
| aws_lambda: aws-sam-cli | ||
| aws_lambda: boto3 |
There was a problem hiding this comment.
Bug: The removal of the aws-sam-cli dependency from tox.ini makes AWS Lambda tests rely on sam being pre-installed in the CI environment, which is a fragile assumption.
Severity: HIGH
Suggested Fix
Re-add aws-sam-cli as a test dependency in tox.ini to ensure the sam command is explicitly installed and available when the AWS Lambda integration tests are executed. This makes the test environment self-contained and not reliant on the state of the CI runner.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: tox.ini#L366
Potential issue: The AWS Lambda integration tests in `test_aws_lambda.py` execute the
`sam` command-line tool via a `subprocess.Popen` call. This pull request removes the
`aws-sam-cli` package from the tox dependencies. While the `sam` CLI might be
pre-installed on the GitHub Actions runners, this change makes the test suite dependent
on an implicit, unversioned tool in the runner environment. If the `sam` binary is not
present in the `PATH` for any reason, such as a runner image update, the test fixture
setup will fail with a `FileNotFoundError`. This will cause all AWS Lambda tests to fail
and break the CI pipeline.
Did we get this right? 👍 / 👎 to inform future reviews.
Description
GH environment already has AWS SAM installed with a version compatible with the Docker API offered.
Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)