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

Backport of cmd/hcl2_upgrade: Fix crash when variables block is undefined into release/1.8.x #12257

Conversation

hc-github-team-packer
Copy link
Collaborator

Backport

This PR is auto-generated from #12250 to be assessed for backporting due to the inclusion of the label backport/1.8.x.

The below text is copied from the body of the original PR.


This change fixes a crash that occurs when trying to add undeclared variables into an empty
variables map. The variables block when defined will always be non-nil but in the case
where variables are declared and initialized from a legacy JSON variables file the map
must be initialized first.

Closes #12199

@hc-github-team-packer hc-github-team-packer requested a review from a team as a code owner February 8, 2023 18:40
@hc-github-team-packer hc-github-team-packer force-pushed the backport/nywilken/hcl2upgrade-variables-empty-map/rationally-suited-walrus branch from 1c3e856 to f4522fa Compare February 8, 2023 18:40
@hc-github-team-packer hc-github-team-packer merged commit e2ca082 into release/1.8.x Feb 8, 2023
@hc-github-team-packer hc-github-team-packer deleted the backport/nywilken/hcl2upgrade-variables-empty-map/rationally-suited-walrus branch February 8, 2023 18:41
@github-actions
Copy link

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 issues.
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 Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants