-
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 for plugins which won't be disable-able in 8.0 #112602
Log deprecation warnings for plugins which won't be disable-able in 8.0 #112602
Conversation
Pinging @elastic/kibana-core (Team:Core) |
For reviewers who would like to test how this looks with the Upgrade Assistant, I have a PR opened that will manually backport this to 7.x #112728 (We still need to merge this PR into master as it adds some new APIs to Core's |
@elasticmachine merge upstream |
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.
maps changes LGTM
code review
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.
Infra changes LGTM! I tested locally and I can verify:
- I got the deprecation warning in my Kibana server
- the issue appeared under Kibana deprecation issues in Upgrade assistant
One thing I should note here is that I got following error when I clicked on the Enable deprecation logging and indexing
toggle of step3 in the Upgrade Assistant only the first time. Clicking on the toggle again didn't produce any error.
@Kerry350 Can you verify that we don't make use of this flag anywhere in the infra plugin? I searched for it and didn't find anything.
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.
Asset management LGTM
Just to provide some context here, the So the impact here would be on any users are relying on disabling the infra plugin via the config, as that is the functionality which will be going away in 8.0.
I discussed this with @cjcenizal and he said it is a known issue with the Upgrade Assistant that is currently being worked on. Thanks for calling it out! |
@elasticmachine merge upstream |
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.
APM changes LGTM
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: cc @lukeelmers |
…-migrate-away-from-injected-css-js * 'master' of github.com:elastic/kibana: (189 commits) fix permissions for cloud test (elastic#112568) Updates the VEGA docs for v8.0 (elastic#112781) Updates the TSVB docs for v8 (elastic#112778) [Expressions] Fix setup and start contracts (elastic#110841) [DOCS] Update remote cluster and security links (elastic#112874) test/functional/apps/management/_test_huge_fields.js (elastic#112878) Fix the other one... (elastic#112873) [data.search.aggs] Use fields instead of _source in top_hits agg (elastic#109531) [Search sessions] Don't show incomplete warning if search requests aren't in session (elastic#112364) [data.search] Do not send ignore_throttled when search:includeFrozen is disabled (elastic#112755) [Monitoring] Add KQL filter bar to alerts (elastic#111663) Log deprecation warnings for plugins which won't be disable-able in 8.0 (elastic#112602) [CI] Balance CI Groups (elastic#112836) Add ILM URLs to documentation link service (elastic#112748) Bump chromedriver to 93 (elastic#112847) [Maps] move joins from LayerDescriptor to VectorLayerDescriptor (elastic#112427) Add a handler for a possible promise rejection (elastic#112840) Removes space, fix build (elastic#112856) [Maps] fix unhandled promise rejections in jest tests (elastic#112712) Copy pass 3 (elastic#112815) ... # Conflicts: # src/plugins/dashboard/public/application/dashboard_app.tsx # src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx
This PR is a replacement of #111890 -- apologies if you are being pinged for a second review.
Closes #110614
Notes if you are pinged for a CODEOWNERS review
This PR moves forward with the plan outlined in #89584 to remove the ability for plugins to be disable-able by default in 8.0.
If you are tagged for a review here, it is for one of the following reasons:
enabled
property in your config schema, so a deprecation has been added for it.enabled
property but does not have a config schema, however you had indicated you need to preserve the ability to disable it (e.g.vis_type_*
plugins). In this case an explicit config has been added for you.The good news is that most likely you'll only need to review one or two lines of code 🙂
To test the deprecations:
<my-plugin>.enabled: true
<my-plugin>.enabled: false
7.x
backport PR and repeat steps 1-3: [7.x] Log deprecation warnings for plugins which won't be disable-able in 8.0 (#112602) #112728 You should be able to see a critical deprecation notice under Stack Management > Upgrade AssistantI also tried to find any documentation that referred to a plugin with an
.enabled
property. If the docs for your app have been changed, please give them a look. (Preview: https://kibana_112602.docs-preview.app.elstc.co/diff)This change will be backported to 7.16. In a follow-up PR, we will implement the actual 8.0 breaking change by removing the deprecated config.
Notes for Core Team
The approach here does the following:
.enabled
config that's implicitly added (i.e., plugins which currently have no config schema)vis_type_*
plugins which currently don't have one but will need to keep an.enabled
config in 8.0.enabled
config that's explicitly added in their config schemadeprecate
anddeprecateFromRoot
to theConfigDeprecationFactory
.enabled
properties.I went with this approach because:
.enabled
property in 8.0, so this is just a precursor to that PR.enabled
property are unaffected.enabled
property moving forward, they just add it to their config schemaHowever, I'm still open to feedback on alternatives.
Plugin API Changes
The ability for most plugins to be disabled using the
{plugin_name}.enabled
config option has been deprecated. In 8.0, most Kibana plugins can no longer be disabled using this option.Plugin developers can still opt-in to this feature by explicitly adding an
enabled
property to their config schema. However, we recommend against this when possible; it affects whether or not a plugin's code is loaded by Kibana's core, thus introducing complexity and creating a new set of configuration scenarios that must be tested.If you would like to make some aspects of your plugin disable-able, for example the ability to remove it from Kibana's UI entirely, we recommend instead creating "nested" configuration options, e.g.
{plugin_name}.ui.enabled
instead of{plugin_name}.enabled
, and then reading from the configuration at runtime to conditionally render your application. This gives you similar functionality without preventing your plugin code from loading altogether.Deprecation docs
The ability for most plugins to be disabled using the
{plugin_name}.enabled
config option has been deprecated. In 8.0, most Kibana plugins can no longer be disabled using this option. If you are currently using one of these options in your Kibana config, please remove it before upgrading to 8.0.