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

Plugin installer want to check everything in the plugin folder #74879

Closed
fbacchella opened this issue Jul 2, 2021 · 4 comments
Closed

Plugin installer want to check everything in the plugin folder #74879

fbacchella opened this issue Jul 2, 2021 · 4 comments
Labels
:Core/Infra/Plugins Plugin API and infrastructure >enhancement Team:Core/Infra Meta label for core/infra team

Comments

@fbacchella
Copy link

All the content of /usr/share/elasticsearch/plugins is checked, even hidden files.
Providing a way to filter out some content here could be helpful.
For example, I would like to store in a special file some custom informations about installed plugin. It can be hidden, or with any names. But that's not actually possible.

The problem is at

public static List<Path> findPluginDirs(final Path rootPath) throws IOException {

A few check to avoid adding everything could be helpfull.

@fbacchella fbacchella added >enhancement needs:triage Requires assignment of a team area label labels Jul 2, 2021
@MarkRibeiro
Copy link

@fbacchella could it be as simple as this?

for (Path plugin : stream) {
   if (FileSystemUtils.isDesktopServicesStore(plugin) ||
      plugin.getFileName().toString().startsWith(".")) {
      continue;
   }
[...]
}

Or is it something more elaborate?

@fbacchella
Copy link
Author

fbacchella commented Jul 5, 2021

Or it could be checked using https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#isHidden-java.nio.file.Path-. I don't know if smarter filtering is needed. For example, can a plugin be stored in a file ? If not, only directories should be returned.

@pugnascotia pugnascotia added the :Core/Infra/Plugins Plugin API and infrastructure label Jul 5, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jul 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@pugnascotia pugnascotia removed the needs:triage Requires assignment of a team area label label Jul 5, 2021
@rjernst
Copy link
Member

rjernst commented Jul 30, 2021

@fbacchella I suggest you store your additional plugin metadata in a different path. The plugins directory is meant to be completely controlled by Elasticsearch. It is not meant as a general directory for users to store anything in. If by chance it is metadata about which plugins should be installed, consider storing it in the configuration directory, but also note that we are planning to add such a feature.

As this is working as designed, and we do not plan to make any changes to that design, I hope you don't mind that I close this issue.

@rjernst rjernst closed this as completed Jul 30, 2021
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 Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

5 participants