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

Add "name" to the plugin descriptor file #12715

Closed
clintongormley opened this issue Aug 7, 2015 · 4 comments
Closed

Add "name" to the plugin descriptor file #12715

clintongormley opened this issue Aug 7, 2015 · 4 comments
Assignees
Labels
:Core/Infra/Plugins Plugin API and infrastructure >enhancement

Comments

@clintongormley
Copy link
Contributor

Add "name" to plugin descriptor file, not what user provides

To be sane, probably needs to not have elasticsearch-. Another painful artifact renaming? (think difficult build issues)

@spinscale
Copy link
Contributor

possible solution here: open the zip archive of the specified location, peek into the descriptor file and extract the name out of it?

@cbuescher
Copy link
Member

I opened #12775 that adds a new mandatory property name to the plugin descriptor file which will overwrite the name that gets passed to the plugin CLI as an argument. See PR for some open questions I have around the overall goal and what this means for using the command line tool.

@cbuescher cbuescher removed the help wanted adoptme label Aug 14, 2015
@cbuescher cbuescher added v2.1.0 and removed v2.1.0 labels Aug 18, 2015
cbuescher added a commit to cbuescher/elasticsearch that referenced this issue Aug 19, 2015
…lugin name

At the moment, when installing from an url, a user provides the plugin name on
the command line like:

* bin/plugin install [plugin-name] --url [url]

This can lead to problems when picking an already existing name from another
plugin, and can potentially overwrite plugins already installed with that name.

This, this PR introduces a mandatory `name` property to the plugin descriptor
file which replaces the name formerly provided by the user.

With the addition of the `name` property to the plugin descriptor file, the user
does not need to specify the plugin name any longer when installing from a file
or url. Because of this, all arguments to `plugin install` command are now
either treated as a symbolic name, a URL or a file without the need to specify
this with an explicit option.

The new syntax for `plugin install` is now:

bin/plugin install [name or url]

* downloads official plugin
bin/plugin install analysis-kuromoji

* downloads github plugin
bin/plugin install lmenezes/elasticsearch-kopf

* install from URL or file
bin/plugin install http://link.to/foo.zip
bin/plugin install file:/path/to/foo.zip

If the argument does not parse to a valid URL, it is assumed to be a name and the
download location is resolved like before. Regardless of the source location of
the plugin, it is extracted to a temporary directory and the `name` property from
the descriptor file is used to determine the final install location.

Relates to elastic#12715
@cbuescher
Copy link
Member

Merged #12775 with master, @clintongormley let me know if an when this should go to the release branch. It should be backported together with #12879 in this case.

cbuescher added a commit that referenced this issue Aug 20, 2015
…lugin name

At the moment, when installing from an url, a user provides the plugin name on
the command line like:

* bin/plugin install [plugin-name] --url [url]

This can lead to problems when picking an already existing name from another
plugin, and can potentially overwrite plugins already installed with that name.

This, this PR introduces a mandatory `name` property to the plugin descriptor
file which replaces the name formerly provided by the user.

With the addition of the `name` property to the plugin descriptor file, the user
does not need to specify the plugin name any longer when installing from a file
or url. Because of this, all arguments to `plugin install` command are now
either treated as a symbolic name, a URL or a file without the need to specify
this with an explicit option.

The new syntax for `plugin install` is now:

bin/plugin install [name or url]

* downloads official plugin
bin/plugin install analysis-kuromoji

* downloads github plugin
bin/plugin install lmenezes/elasticsearch-kopf

* install from URL or file
bin/plugin install http://link.to/foo.zip
bin/plugin install file:/path/to/foo.zip

If the argument does not parse to a valid URL, it is assumed to be a name and the
download location is resolved like before. Regardless of the source location of
the plugin, it is extracted to a temporary directory and the `name` property from
the descriptor file is used to determine the final install location.

Relates to #12715
@cbuescher
Copy link
Member

Also merged #12775 with 2.0 (d236192). @clintongormley I think I can close this? Otherwise please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Plugins Plugin API and infrastructure >enhancement
Projects
None yet
Development

No branches or pull requests

3 participants