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
Conversation
|
||
if (topLevelDirNames.size() == 1) { | ||
String dirname = topLevelDirNames.iterator().next(); | ||
if (!"_site".equals(dirname) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! That's definitely better indeed. :)
@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 |
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? |
@markharwood Actually we can test it! :) \o/ See latest commit. |
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 elastic#7152.
Pushed in master, 1.x and 1.3 |
bin
and config
only plugins do not install correctlybin
and config
only plugins do not install correctly
bin
and config
only plugins do not install correctlybin
and config
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.