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 to packer-plugin-sdk v0.0.11 and regenerate HCL config #43

Merged
merged 2 commits into from
Mar 8, 2021

Conversation

frightenedmonkey
Copy link
Contributor

@frightenedmonkey frightenedmonkey commented Feb 23, 2021

The packer 1.7 release changed the protocol version to 5 (also, notably,
the plugin SDK didn't correctly format the protocol information as
expected until v0.0.11). Running the packer-sdk-migrator tool mostly
worked, but left a couple of issues with fields in the config marked as
unused. It appears that the changes to HCL—and how mapstructure decodes
things—requires that you annotate basic fields with mapstructure
struct tags when the fields don't follow the default mapping.

This change resolves #42

@fishnix
Copy link
Contributor

fishnix commented Feb 25, 2021

Hi @frightenedmonkey thanks for this PR! Will this break backwards compatibility with older versions of packer? Also, I've recently merged and released Windows support which will require you to rebase and regenerate your hcl spec. Thanks!

@frightenedmonkey
Copy link
Contributor Author

@fishnix I'll rebase.

With regard to backwards compatibility, unfortunately, Hashicorp broke it with the update. If you review their guide on upgrading to 1.7 templates, you can see the table I've screenshot below:

Screen Shot 2021-02-25 at 8 19 09 AM

I don't have a solution for that, unfortunately.

@fishnix
Copy link
Contributor

fishnix commented Feb 25, 2021

Ok thanks, we can probably release this as a major version upgrade then. Does that seem reasonable?

@frightenedmonkey
Copy link
Contributor Author

SGTM; I appreciate you being receptive!

The packer 1.7 release changed the protocol version to 5 (also, notably,
the plugin SDK didn't correctly format the protocol information as
expected until v0.0.11). Running the packer-sdk-migrator tool mostly
worked, but left a couple of issues with fields in the config marked as
unused. It appears that the changes to HCL and how mapstructure decodes
things requires that you annotated basic fields with mapstructure
struct tags that don't follow the default mapping.
The template/interpolate package has been moved to the packer-plugin-sdk
repository. This fixes the tests after rebasing.
@frightenedmonkey
Copy link
Contributor Author

@fishnix rebased & tests are passing locally for me (nice to get some :-D)

@fishnix fishnix merged commit 3924a44 into YaleUniversity:master Mar 8, 2021
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.

Update plugin protocol
2 participants