Skip to content

[3.x] Fix YAML parsing of existing stack templates - #448

Merged
GrahamCampbell merged 2 commits into
3.xfrom
fix-remote-template-schema-3x
Sep 6, 2026
Merged

[3.x] Fix YAML parsing of existing stack templates#448
GrahamCampbell merged 2 commits into
3.xfrom
fix-remote-template-schema-3x

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Contributor

The deployment bucket repair path fetches an existing stack's original template and falls back to a YAML parse when it is not JSON, but that parse used js-yaml's default schema instead of the shared CloudFormation schema. Date-shaped scalars such as an IAM policy Version became Date objects and were re-submitted as ISO 8601 strings, and any template using shorthand intrinsics like !Ref failed with CLOUDFORMATION_TEMPLATE_PARSE_FAILED. This passes the shared schema at that call site, mirroring #442, and includes the underlying parse error in the message. The 3.x branch had no YAML repair tests, so this adds them for both deployment methods along with a parse failure test. This is the 3.x companion of #447. Fixes #443.

@GrahamCampbell GrahamCampbell changed the title [3.x] Parse remote CloudFormation template with shared schema [3.x] Fix YAML parsing of existing stack templates Sep 6, 2026
@GrahamCampbell
GrahamCampbell merged commit c630a6c into 3.x Sep 6, 2026
8 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix-remote-template-schema-3x branch September 6, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant