The migrator tool to upgrade single component plugins generally seems to work well. However, it appears that the default version of the SDK that is used errors when used with packer 1.7 due to an assumption in the packer codebase when checking the protocol used by the plugin.
To set the context of the problem, packer 1.7 doesn't actually evaluate the version of the protocol sent by the plugin. That, arguably, is the bug, but I'm reporting it here because it's more easily solvable here. Here is where packer is evaluating the plugin protocol version, only checking whether the parts in the plugin server response is 3 parts because:
In protocol version 4 and before, the protocol only had a Major version
The version of the plugin SDK migrated to is v0.0.10, which, as you can see here, only sets the major version (albeit to major version 5).
I've verified in a plugin that I'm mucking about with that bumping the go.mod dependency to v0.0.11 works to get past the protocol error from packer. At the least, I think the migrator should bump the sdk dependency to v0.0.11. Cross-project version dependencies seem like they'd be difficult here, though.
The migrator tool to upgrade single component plugins generally seems to work well. However, it appears that the default version of the SDK that is used errors when used with packer 1.7 due to an assumption in the packer codebase when checking the protocol used by the plugin.
To set the context of the problem, packer 1.7 doesn't actually evaluate the version of the protocol sent by the plugin. That, arguably, is the bug, but I'm reporting it here because it's more easily solvable here. Here is where packer is evaluating the plugin protocol version, only checking whether the parts in the plugin server response is 3 parts because:
The version of the plugin SDK migrated to is v0.0.10, which, as you can see here, only sets the major version (albeit to major version 5).
However, in v0.0.11, the server sets both a major and minor version of the API.
I've verified in a plugin that I'm mucking about with that bumping the go.mod dependency to v0.0.11 works to get past the protocol error from packer. At the least, I think the migrator should bump the sdk dependency to v0.0.11. Cross-project version dependencies seem like they'd be difficult here, though.