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

Rename plugin command #12865

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Rename plugin command #12865

merged 2 commits into from
Mar 11, 2024

Conversation

lbajolet-hashicorp
Copy link
Contributor

The plugin command existed so that Packer was able to invoke its embedded components for a build.
The name however is a bit close to plugins, and the help messages aren't clear if invoked by mistake, which can be quite confusing when trying to use Packer to manage installed plugins.

Since we're doubling down on using Packer to manage those, the problem may become exacerbated in the future, so we are renaming the command to invoke a component to execute. No other command is close in name to this, so it's less likely to be mistakenly invoked by a user.

In addition to execute, we are also using plugin as an alias for plugins, so that packer plugins installed and packer plugin installed are in effect the same command (this is true for all the other subcommands).

Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based our discussion lets not document this command and keep it as an alias for now.

Lets clean up the list of commands in commands.go.

@nywilken nywilken added this to the 1.11.0 milestone Mar 11, 2024
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Just one small suggestion. Approving so you can merge when ready.

command/execute.go Outdated Show resolved Hide resolved
The plugin and plugins command had a name that was close, and while
plugin is not supposed to be directly called by Packer users, this could
happen by accident while trying to execute packer plugins subcommands,
and when it does, the error messages are far from explicit, so unless
they understand what Packer is doing here, they'll likely be lost.

To reduce the risk of confusion, we rename the command to run packer
embedded components as execute.
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbajolet-hashicorp lbajolet-hashicorp merged commit a463abd into main Mar 11, 2024
11 checks passed
@lbajolet-hashicorp lbajolet-hashicorp deleted the rename_plugin_command branch March 11, 2024 19:06
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 Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants