Changes to step API for 3rd party plugins

18 views
Skip to first unread message

Matthew Hooker

unread,
Jan 24, 2018, 8:19:56 PM1/24/18
to packe...@googlegroups.com
Hi all,

I want to alert you to some changes we're going to be making to the step API. The changes are minimal, and shouldn't have an impact on existing plugins, but I want to make sure people are aware of it.

There's a PR at https://github.com/hashicorp/packer/pull/5810 to move the multistep library into packer itself, and to add `context.Context` as a parameter to the `Step.Run` interface.

If you have your plugin dependencies pegged through govendor or similar, you should not be impacted. Existing plugin binaries will continue to work, and your plugin will continue to build.

If, however, you update your dependencies to the latest version of packer, you'll need to do two things:

2. Change your Step.Run signatures to have `context.Context` as the first parameter. I did this with `find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`

Thanks!
--Matt Hooker


Reply all
Reply to author
Forward
0 new messages