-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Separate public and private API for plugins #4704
Comments
The answer here is that there are no public plugin APIs right now. We will get to that point, but we're still determining the components that should be public and should be private. |
See here: https://github.com/elastic/kibana/blob/master/src/plugins/README.txt Despite that file saying tickets asking about plugins will be closed, I'm going to leave this open to foster discussion of the eventual plugin API. |
Since 4.2.0 will introduce (afaik) the installing of plugins from remote sources, is there also any estimated target version for making a public plugin API? |
Currently no, we're still sorting out what we need to make available. Feel free to add ideas to this thread |
@timroes I expect that we will "expose" the api in pieces using, like you said, api-specific modules. We don't have any official plans for how this will look in code though, perhaps it's a good time to pull together some dreamcode. |
As heard from ElasticON Tour in Munich there are now plans for supporting development of custom plugins for beginning of 2016. So I guess there have been some thoughts about how to separate private and public APIs, bundling libraries, etc. For the sake of documentation would you care to elaborate on your plans about how you want to handle separation and how that public API might look like? Is this ticket the correct place for leaving suggestions what parts of Kibana I wish to access from plugins and I would like to see in the public API. Have there been any considerations for versioned APIs, so Kibana plugins are not bound strictly to the underlying Kibana version? |
/cc @rashidkpc @spalger I really would like your feedback about that topic. |
@timroes I like your suggestion of As for versioning, we will only make stable and backwards compatible changes to public APIs in minor/patch versions. In major versions these APIs may get breaking changes. I appreciate the explicitness of something like If you want to being writing plugins now I recommend that you use your own dependencies where possible. This should prevent us from breaking things unintentionally. |
@spalger thanks for the informations. The problem with me writing custom plugins at the moment (and we get several client requests for that) is that most of them would require internal APIs (which cannot be satisfied by external libraries), e.g. access to the currently set filters, the current ES query, etc. All these are available via some kind of code, e.g. via the So if we offer a client kibana plugins it only can go with the warning: they might be fixed to your current version exactly. Every patch version might break the plugin, since we might have used something that wasn't meant to be used and has been refactored in a patch version. This let's us end up in a kind of unsecure situation (kind of similar to ES plugin development). Since I would really like to be able to offer a client a great plugin, that we can kind of guarantee it will run for some versions (hopefully years), I am very interested in the progress in this and bother often here, to get some progress. Is the separation of APIs isn't something to come in the near future, but you anyway would like to see third party plugins? Or is a public API planned for near future releases, or isn't it planned and you actually don't want to see third party plugins at the current state of art? If you could give me some heads up about that it would be nice, because it might be, that I have a nearly finished tutorial on how to write Kibana plugins for the current (not explicit public) API on hold and just not publishing, because I thought there might be an explicit public API in the near future. :-) Thanks so much for an answer! |
If you start developing plugins for clients then you will likely have to update those plugins with each release of Kibana (as you guessed). We are also unlikely to release a public API that would give you access to all of the things you seek. Certain API's will be exposed in the near future, but it doesn't sound like the APIs you are looking for will be available soon. Sorry, hope this is helpful though. |
Well, I had the wonderful idea of writing a Kibana plugin this morning, then I stumbled onto this issue while trying to figure out how. Is there any progress on making a plugin system work for Kibana? Would a description of what I want to do help? Or would it just clutter the discussion? |
+1. Are there any news on this? |
Any news on this? |
@mkozjak @havidarou There is currently an ongoing effort to build a new underlying platform for Kibana, that will also offer proper interfaces and exports from plugins. You can find a detailed explanation in #9675 |
Kibana has come an incredible way since I wrote that issue. And with the near finalization of the Kibana platform the principles outlined in this issues has come into reality now. Plugins have a clear contract they expose and importing from other Plugins is limited to specific API and pathes. Thanks everyone for the effort and journey that brought us here. Thanks @joshdover and everyone involved. /closing my oldest issue at this time |
In the current development state of the plugin system, you have to include several modules to create some basic functionality, e.g. the
ui/filter_manager
module if you want to add a filter by clicking in your custom visualization. Basically you could require every module.It is (at the moment) pretty unclear which of the modules are meant for external usage in plugins (e.g. I would consider the filter_manager to be such a module) and which are not meant for usage in plugins, because their API might change during releases often/a lot.
Are there any plans on how this might be solved to make a clear separation on what modules plugins can rely and on which they shouldn't?
My suggestion would be: Don't just try to solve that by documentation, but perhaps make a new folder
src/api
in which all modules that are considered public will have a wrapper. I.e. a user pluginrequire('api/filter_manager')
; that module basically just delegates everything toui/filter_manager
. It would be pretty clear (and can be documented), that user plugins should only rely on modules in theapi
path. Also, if theui/filter_manager
needs updating at some point theapi/filter_manager
could still offer the old interface for backward compatibility reasons (or there could be versioned modules likeapi/filter_manager/v1
which will always have the same interface).The text was updated successfully, but these errors were encountered: