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

update hcl v2.19.1 #34108

Merged
merged 3 commits into from
Oct 18, 2023
Merged

update hcl v2.19.1 #34108

merged 3 commits into from
Oct 18, 2023

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Oct 18, 2023

Update hcl to v2.19.1, which fixes an issue where the decoder can return null or unknown values which still contain optional attribute type constraints.

Remove invalid configschema tests. Schema attributes must have a type to be valid. These would have panicked anyway when used in other cases, but were passing within the limited test case. The update to hcl makes these panic earlier, so add our own panics to prevent invalid attribute schemas entirely.

We can be fairly certain these panics didn't affect actual functionality outside of the synthetic tests, because hcldec was returning an invalid cty.NilVal with no error, which itself would have panicked later if used.

@jbardin jbardin added the 1.6-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Oct 18, 2023
@jbardin jbardin requested a review from a team October 18, 2023 13:18
Schema attributes must have a type to be valid. These would have
panicked anyway when used in other cases, but were passing within the
limited test case. The update to hcl makes these panic earlier, so add
our own panics to prevent invalid attribute schemas entirely.
The type isn't needed here for what marshalModuleCall is doing
(converting hcl config into the generic plan json config output), but
the new check in configschema prevents the invalid Attribute value.
@jbardin jbardin force-pushed the jbardin/update-hcl branch from 89e3e5e to 6985a6c Compare October 18, 2023 16:23
@jbardin jbardin merged commit e96a1c5 into main Oct 18, 2023
4 checks passed
@github-actions
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link
Contributor

github-actions bot commented Dec 7, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.6-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants