Repository navigation
fix: write the boilerplate var file as JSON so strings stay strings - #483
Draft
ZachGoldberg wants to merge 1 commit into
Draft
ZachGoldberg wants to merge 1 commit into
ZachGoldberg wants to merge 1 commit into
Conversation
The cold render wrote --var-file with YAML.stringify, which leaves strings like 2026-11-01T00:00:00Z, yes or 0123 unquoted. boilerplate reads the file as YAML 1.1 and got a timestamp, a bool or an octal number back, then rejected it for a string variable: Value '2026-11-01 00:00:00 +0000 UTC' is not a valid value for variable 'BudgetStartDate' with type 'string'. JSON is valid YAML and quotes every string.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This branch was successfully deployed
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.
The cold render path writes
--var-filewithYAML.stringify, which leaves strings such as2026-11-01T00:00:00Z,yesor0123unquoted. boilerplate reads the file as YAML 1.1, gets a timestamp, bool or octal number back, and rejects it for a string variable:Found running the Azure landing zone
upgrade-landing-zonerunbook, whoseBudgetStartDatecomes from an earlier step's output.The var file is now JSON (valid YAML, every string quoted). Checked with the vendored boilerplate v0.17.0: the same values as plain YAML fail with the error above; as JSON they render, with lists and numbers keeping their types.
Tests:
varFileContentround-trips dates,yes,0123, lists, numbers, bools and maps through a YAML 1.1 parser; the shell-helper test now parses the var file.just check, backend and integration tests pass (2 backend tests fail on this machine's Git 2.34 with or without this change).