Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Bump hcl2json to v0.6.5 #1074

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

deps: Bump hcl2json to v0.6.5 #1074

wants to merge 1 commit into from

Conversation

jalseth
Copy link
Member

@jalseth jalseth commented Feb 19, 2025

This is a breaking change for Rego policies that check HCL2 syntax. The new input always uses arrays instead of conditionally using arrays only when a HCL block has more than one element with the same name.

This will not be merged until the April release as this is a breaking change. The March release will contain a breakage announcement.

Fixes: #1006
Relates to: #1014

Signed-off-by: James Alseth <[email protected]>
Copy link
Member

@boranx boranx left a comment

Choose a reason for hiding this comment

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

Thanks for organizing it into a more generic table-driven form!
Besides, +1 to use parsers' unmarshal and leaning on map[string]any instead of intermediate JSON conversions and indentation steps in tests in general.
Also, +1 to use Google's cmp to subtract diff instead of printing out all the inputs/outputs in verbose mode. We can expand it to all the test suites as part of our test conventions

In the meantime, I was thinking in parallel how can we introduce this type of breaking changes related to parsing behaviours in our docs. Would it make sense if each parser had its own section explaining the basic transformation process and caveats, as well as recent behavioral changes?

LGTM, neat

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.

inconsistent behaviour for resources that can have repeated blocks defined with HCL2
2 participants