fix(toolkit-lib): hotswap deployments fail with TypeError when a nested stack output joins a List<> parameter - #1842
Merged
aws-cdk-automation merged 1 commit intoAug 17, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1842 +/- ##
==========================================
- Coverage 90.32% 90.29% -0.04%
==========================================
Files 80 80
Lines 12124 12124
Branches 1716 1714 -2
==========================================
- Hits 10951 10947 -4
- Misses 1139 1143 +4
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ed stack output joins a List<> parameter
Root cause: the nested-stack evaluator was seeded with parameter
declarations (e.g. {Type: "AWS::SSM::Parameter::Value<List<String>>"})
instead of the concrete values from the parent resource's
Properties.Parameters map. When Fn::Join received this object instead
of an array, a raw TypeError escaped the CfnEvaluationException-only
handler and aborted the deployment rather than falling back to
CloudFormation.
Fix is two-part:
1. Seed the nested evaluator with
`this.template.Resources?.[logicalId]?.Properties?.Parameters ?? {}`
so Ref resolves to actual parameter values.
2. Add assertEvaluatesToArray / assertEvaluatesToString guards on
Fn::Join, Fn::Split, and Fn::Select so that any future type mismatch
throws CfnEvaluationException (caught and triggers CloudFormation
fallback) rather than an uncatchable TypeError.
Fixes aws#1829
9pace
force-pushed
the
fix/hotswap-nested-list-param-join
branch
from
August 17, 2026 13:45
9bde153 to
2eb2712
Compare
ShadowCat567
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1829
Hotswap deployments crash with an uncaught
TypeError: evaluatedArgs.join is not a functionwhen a nested stack output usesFn::Joinon aList<>-typed parameter. The nested-stack evaluator was seeded with parameter declarations (e.g.{"Type": "AWS::SSM::Parameter::Value<List<String>>"}) instead of the values from the parent resource'sProperties.Parameters, and the resultingTypeErrorescaped theCfnEvaluationException-only handler, aborting the deployment instead of falling back to CloudFormation.Two-part fix:
Properties.Parametersfrom the parent resource, soRefresolves to actual values.assertEvaluatesToArray/assertEvaluatesToStringguards toFn::Join,Fn::Split, andFn::Select, throwingCfnEvaluationException(caught, triggers CloudFormation fallback) instead of a rawTypeError. The guards are required even with the seed fix: a nested stack resource withoutProperties.Parametersseeds{},Reffalls through to the declaration'sDefault(a non-array), and only the guard prevents the crash.Known limitation: CloudFormation's nested-stack
Parametersmap isMap<String, String>, so list values arrive as"val1,val2,val3"and fall back to CloudFormation instead of hotswapping (possible follow-up).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license