Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1ba2f02
feat: add CloudFormation Language Extensions processing library
bnusunny Feb 13, 2026
5ca1763
feat: integrate language extensions into SAM CLI
bnusunny Feb 13, 2026
d267527
feat: add language extensions support to sam build
bnusunny Feb 13, 2026
ede506e
feat: add language extensions support to sam package and deploy
bnusunny Feb 13, 2026
adc02f6
test: add validate, local invoke, and start-api integration tests
bnusunny Feb 13, 2026
8aa7044
feat: add telemetry tracking for CloudFormation Language Extensions
bnusunny Feb 26, 2026
9f4b55a
test: trim language extensions integration tests to essential cases
bnusunny Mar 6, 2026
4a852c2
fix: Fn::Equals uses string comparison to match CloudFormation behavior
bnusunny Mar 9, 2026
3856180
fix: scope intrinsic resolution to Resources, Conditions, and Outputs…
bnusunny Mar 9, 2026
c3ef249
refactor: rename iter_resources to iter_regular_resources
bnusunny Mar 10, 2026
563b84f
refactor: deduplicate _to_boolean and fix TOCTOU in expansion cache
bnusunny Mar 10, 2026
a0d7c4f
test: remove integration tests referencing deleted test data
bnusunny Mar 11, 2026
2b7ee3b
refactor: address PR review comments on style and test quality
bnusunny Mar 18, 2026
cd65ba2
feat: add &{identifier} syntax support in Fn::ForEach expansion
bnusunny Apr 20, 2026
452222a
fix: remove unsupported list-of-lists identifier format from Fn::ForEach
bnusunny Apr 20, 2026
bceb2b3
fix: use proper type annotation for intrinsic_resolver parameter
bnusunny Apr 20, 2026
45941c4
fix: correct _process_section docstring about which sections it handles
bnusunny Apr 20, 2026
115dbed
test: add tier1_extra markers and replace NamedTemporaryFile
bnusunny Apr 20, 2026
eaaf811
fix: narrow exception handling and bound expansion cache size
bnusunny Apr 20, 2026
89d6013
test: add tests for cache eviction and narrowed exception handling
bnusunny Apr 20, 2026
3732423
fix: improve error visibility and add UTF-8 encoding for file reads
bnusunny Apr 20, 2026
2399047
fix: update test mocks to expect encoding='utf-8' parameter
bnusunny Apr 20, 2026
578b2f2
fix: MissingMappingKeyError now extends DeployFailedError
bnusunny Apr 20, 2026
f34414d
fix: catch unexpected exceptions in child template expansion gracefully
bnusunny Apr 20, 2026
903c812
fix: deep-copy original_template consistently in expand_language_exte…
bnusunny Apr 20, 2026
5ad3477
test: verify original_template is independent from caller's input
bnusunny Apr 20, 2026
f490b3f
fix(test): Remove hardcoded SNS topic names to prevent AlreadyExists …
bnusunny Apr 21, 2026
b5b5253
fix: thread parent parameters into child template expansion
bnusunny Apr 21, 2026
6956c10
fix: narrow exception handling in child template LE expansion
bnusunny Apr 21, 2026
c916784
fix: narrow exception handling in _resolve_nested_stack_parameters
bnusunny Apr 21, 2026
e016af8
fix: gate MissingMappingKeyError on SAM-generated mapping names
bnusunny Apr 21, 2026
fd0bedd
fix: share Fn::ForEach and SAM-mapping helpers across modules
bnusunny Apr 21, 2026
f2d5237
chore: log swallowed exceptions in _partial_resolve at debug level
bnusunny Apr 21, 2026
e05d3d2
fix: declare parent_parameter_values on Resource base class
bnusunny Apr 21, 2026
19bd98e
fix: route all CFN ClientError paths through _create_deploy_error
bnusunny Apr 21, 2026
635bd9e
perf: replace defensive deepcopy with deep_freeze immutability
bnusunny Apr 21, 2026
d56f52c
fix: freeze DynamicArtifactProperty and use tuple for properties list
bnusunny Apr 21, 2026
4d28eef
perf: skip cache and deep_freeze for non-LE templates
bnusunny Apr 22, 2026
dd02cd5
refactor: remove unused expansion cache
bnusunny Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .coveragerc_no_lang_ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Coverage config for `make test` which skips cfn_language_extensions tests.
# Extends the base .coveragerc and also excludes the language extensions source
# so coverage % isn't penalized when those tests are skipped.
[run]
branch = True
omit =
samcli/lib/cfn_language_extensions/*
# Inherited from .coveragerc
samcli/lib/iac/plugins_interfaces.py
samcli/lib/init/templates/*
samcli/hook_packages/terraform/copy_terraform_built_artifacts.py
[report]
exclude_lines =
pragma: no cover
raise NotImplementedError.*
28 changes: 23 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,19 @@ init-latest-release:
bash tests/install-sam-cli-binary.sh

test:
# Run unit tests and fail if coverage falls below 94%
# Run unit tests (excluding cfn_language_extensions) and fail if coverage falls below 94%
pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit --ignore=tests/unit/lib/cfn_language_extensions --cov-config=.coveragerc_no_lang_ext
Comment thread
bnusunny marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[GENERAL] The default make test target now excludes tests/unit/lib/cfn_language_extensions and uses a separate coverage config. This means developers running make test (the most common invocation) will not run the new module's tests. While make pr and make test-all include them, this creates a risk that regressions in the integration points (e.g., sam_integration.py, utils.py) are missed during local development.

Additionally, the dev target's conditional logic relies on git diff --name-only origin/develop..., which will fail silently (exit code 128) if origin/develop doesn't exist (e.g., fresh clone, different remote name), always falling through to the test target that skips the new tests.

Consider making make test run all tests by default and providing a make test-fast for the subset, rather than the other way around. This follows the principle of safe defaults.


test-lang-ext:
# Run cfn_language_extensions unit tests with coverage
pytest --cov samcli.lib.cfn_language_extensions --cov-report term-missing --cov-fail-under 94 tests/unit/lib/cfn_language_extensions

test-all:
# Run all unit tests including cfn_language_extensions
pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit

test-cov-report:
# Run unit tests with html coverage report
# Run all unit tests with html coverage report
pytest --cov samcli --cov schema --cov-report html --cov-fail-under 94 tests/unit

integ-test:
Expand Down Expand Up @@ -58,7 +66,17 @@ lint:
mypy --exclude /testdata/ --exclude /init/templates/ --no-incremental setup.py samcli tests schema

# Command to run everytime you make changes to verify everything works
dev: lint test
# Runs test-all if cfn_language_extensions files changed, otherwise test
dev: lint
@if git diff --name-only origin/develop... 2>/dev/null | grep -qE 'cfn_language_extensions/'; then \
echo "Detected cfn_language_extensions changes — running all tests"; \
$(MAKE) test-all; \
else \
$(MAKE) test; \
fi

# Run full verification including language extensions tests
dev-all: lint test-all

black:
black setup.py samcli tests schema
Expand All @@ -72,8 +90,8 @@ format: black
schema:
python -m schema.make_schema

# Verifications to run before sending a pull request
pr: init schema black-check dev
# Verifications to run before sending a pull request — runs ALL tests
pr: init schema black-check lint test-all

# Update all reproducible requirements using uv (can run from any platform)
update-reproducible-reqs:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ max-statements = 80
"__init__.py" = ["F401", "E501"]
"integration_uri.py" = ["E501"] # ARNs are long.
"app.py" = ["E501"] # Doc links are long.
"samcli/lib/cfn_language_extensions/**/*.py" = ["PLR2004", "PLR0911", "PLR1714"] # Magic values and return statements are acceptable in intrinsic resolvers

[tool.black]
line-length = 120
Expand Down
Loading
Loading