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

Plugins with only `bin` and `config` do not install correctly #7154

Closed

Conversation

Projects
None yet
3 participants
@dadoonet
Copy link
Member

dadoonet commented Aug 4, 2014

When installing a bin only plugin, it is identified as a site plugin.

A current workaround would be to create in the zip file another empty dir. So if you have:

  • bin/myfile.sh
  • empty/empty.txt

the bin content will be extracted as expected.

Closes #7152.

@dadoonet dadoonet added the review label Aug 4, 2014

@dadoonet dadoonet self-assigned this Aug 4, 2014

@markharwood

View changes

src/main/java/org/elasticsearch/plugins/PluginManager.java Outdated

if (topLevelDirNames.size() == 1) {
String dirname = topLevelDirNames.iterator().next();
if (!"_site".equals(dirname) &&

This comment has been minimized.

Copy link
@markharwood

markharwood Aug 6, 2014

Contributor

Maybe define a set like the existing "BLACKLIST" set in this class but which is called "VALID_TOP_LEVEL_PLUGIN_DIRS" or similar.
Then you can just check if the single root directory is contained in this set?

This comment has been minimized.

Copy link
@dadoonet

dadoonet Aug 6, 2014

Author Member

Thanks! That's definitely better indeed. :)

@dadoonet dadoonet removed the review label Aug 6, 2014

@dadoonet

This comment has been minimized.

Copy link
Member Author

dadoonet commented Aug 6, 2014

@markharwood Updated based on your comment and added a fix

I ran tests locally on my machine. Though I have no idea on how to cleanly test it using our unit/integration tests as it basically tries to modify $ES_HOME/bin or $ES_HOME/config dirs.

@markharwood

This comment has been minimized.

Copy link
Contributor

markharwood commented Aug 12, 2014

The changes you've made look good, but like you say it could do a test rig that can prove it is doing the right things. Maybe that can be covered in a different issue relating to the test infrastructure?

@dadoonet

This comment has been minimized.

Copy link
Member Author

dadoonet commented Aug 12, 2014

@markharwood Actually we can test it! :) \o/ See latest commit.

plugins: `bin` and `config` only plugins do not install correctly
When installing a bin only plugin, it is identified as a site plugin.

A current workaround would be to create in the zip file another empty dir. So if you have:

* `bin/myfile.sh`
* `empty/empty.txt`

the `bin` content will be extracted as expected.

Closes #7152.

@dadoonet dadoonet removed the review label Aug 12, 2014

@dadoonet

This comment has been minimized.

Copy link
Member Author

dadoonet commented Aug 12, 2014

Pushed in master, 1.x and 1.3

@dadoonet dadoonet closed this Aug 12, 2014

@dadoonet dadoonet deleted the dadoonet:issue/7152-plugin-configbin-dirs branch Aug 12, 2014

@clintongormley clintongormley changed the title plugins: `bin` and `config` only plugins do not install correctly Plugins: `bin` and `config` only plugins do not install correctly Sep 11, 2014

@clintongormley clintongormley changed the title Plugins: `bin` and `config` only plugins do not install correctly Plugins with only `bin` and `config` do not install correctly Jun 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.