-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Log deprecation warnings when plugins are disabled but will no longer be disable-able in 8.0 #110614
Comments
Pinging @elastic/kibana-core (Team:Core) |
Cross-posting @mshustov's comment from #89584 (comment):
These changes will still affect 3rd party plugin devs in that plugins without config schemas will no longer be disable-able. So ideally we are logging deprecation warnings for:
So as for adding a flag to differentiate between 1st and 3rd party plugins, I think that would only be necessary if we took the "handle deprecation logs in core" approach for plugins falling into category (1). But I do agree it would be useful to have this distinction, so might be worth doing as a part of this work if it isn't a huge effort. |
Are we going to keep an hard-coded list inside core to handle these exceptions?
It would be doable to identify third party plugins and preserve the old behavior for them. We did that at some point to log deprecation warnings to legacy 3rd party plugins. At the time, we simply used the plugin's path to identify them (
Doing that from core seems way more robust, so it should imho be the preferred approach, if that's technically doable. Also, if we were to add deprecation to each plugin, we wouldn't be able to do it for 3rd parties. Technically, there is currently no API to check if an kibana/src/core/server/plugins/types.ts Line 28 in 52ee65b
The myPlugin.schema = schema.string() doesn't really make a lot of sense. |
We can do it, for sure.
Who said that we cannot prevent that by validating the manifest file? Also, there is always an option to use
+1
Yeah, it's fine as long as they are able to fix that by changing the config declaration. |
Sure, but such validation will require to differentiate 1st vs 3rd party plugins anyway to see which are allowed to set the flag to true. Are we expecting all our plugins to be |
Nor really, as long as this validation logic is kept in the manifest validator file. kibana/src/core/server/plugins/plugin.ts Line 77 in 1bf765d
So we have this information at a later stage. |
This is the approach I am leaning towards -- 3rd party plugins which have So the approach I'm starting with now is:
|
What 'manually' means exactly here? By adding deprecations in each plugin's descriptor? |
Yes, as we will need to remove those I have a draft PR up if you want to take a look and add feedback: #111890 |
As a part of the effort in #89584 to remove the ability for plugins to be disable-able by default, we need to log deprecation warnings when the
myplugin.enabled
config option is used.This change affects all plugins except those outlined in #89584 (comment).
Since there are so many affected plugins, and some of them don't define a config schema at all, we'll need to think of the most efficient way to log these deprecations (i.e. we may want to consider handling this inside core rather than attempting to log a warning from every single plugin).
Once this task is complete, we can move forward with addressing #89584 and implementing the actual breaking change.
The text was updated successfully, but these errors were encountered: