-
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
Kibana property config migrations #55937
Conversation
@flash1293 I noticed that the Since kibana/src/core/server/kibana_config.ts Lines 24 to 34 in 703a3c2
I can't define the I also wasn't sure how this config below was different than the one above. Seem to like like a duplicate schema. kibana/src/legacy/core_plugins/kibana/index.js Lines 41 to 59 in 703a3c2
|
Very good point, I think you can use a deprecation helper though to rename the config key, right? I think you can't use the default
Good catch, didn't notice that. They should definitely stay in sync (so if you are moving out something to the new platform, remove it from both)
Those can be omitted for this PR. There is also some discussion about those going on in #46705 |
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.
LGTM, just left a minor comment.
schema: configSchema, | ||
deprecations: ({ renameFromRoot }) => [ | ||
// TODO: Remove deprecation once defaultAppId is deleted | ||
renameFromRoot('kibana.defaultAppId', 'kibana_legacy.defaultAppId'), |
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.
This triggers a warning in the server logs when kibana.defaultAppId
is used:
log [16:23:34.047] [warning][config][deprecation] "kibana.defaultAppId" is deprecated and has been replaced by "kibana_legacy.defaultAppId"
Since we are going to sunset the whole config key soon it doesn't really help when users are prompted to change the setting now.
It seems like an easy way to do this is to no pass down the logger function to the helper:
[
// TODO: Remove deprecation once defaultAppId is deleted
(config, rootPath) => renameFromRoot('kibana.defaultAppId', 'kibana_legacy.defaultAppId')(config, rootPath, /* don't log this deprecation because it won't stay long*/ () => {}),
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.
I was suggesting to copy the renameFromRoot
code to ignore the logger, as this was temporary. but the suggestion may be better
@joshdover To give a bit more context on this change -
|
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.
Platform changes and config deprecations LGTM
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.
LGTM when the kibana_legacy
pluginId is renamed to kibanaLegacy
@@ -1,6 +1,6 @@ | |||
{ | |||
"id": "kibana_legacy", |
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.
Even if we did not migrate existing plugin's ids when doing #52190, pluginId
should be camelCased. This should be kibanaLegacy
This also means changing calls such as
const { config } = npSetup.plugins.kibana_legacy;
to
const { config } = npSetup.plugins.kibanaLegacy;
Note: this will not change the config path, which default to snakeCase(id)
for convention with the stack's naming, so the property access / deprecations don't need any changes
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.
We have a separate issue tracking this (#55363) - @maryia-lapata is already working on it.
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.
Ok, as long as it's tracked, LGTM.
@pgayvallet are you ok with changes in e42ac5e like we discussed? |
@nickofthyme lgtm |
* Move defaultAppId config param into kibanaLegacy * Move disableWelcomeScreen config param into Home plugin * Update api and docs with silent option for renameFromRoot
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* master: (42 commits) Move kuery_autocomplete ⇒ NP (elastic#56607) [ML] Functional tests - stabilize job row and analytics result view assertions (elastic#56595) [Discover] Inline angular directives only used in this plugin (elastic#56119) [Discover] Migrate get_sort.js test from mocha to TypeScript (elastic#56011) [SIEM] Enable flow_target_select_connected unit tests (elastic#55618) Start consuming np logging config (elastic#56480) [SIEM] Add eslint-plugin-react-perf (elastic#55960) Mention changed SAML ACS endpoint URL in breaking changes doc. (elastic#56613) Add `getServerInfo` API to http setup contract (elastic#56636) Updates Monitoring alert Jest snapshots Kibana property config migrations (elastic#55937) Vislib replacement toggle (elastic#56439) [Uptime] Add unit tests for QueryContext time calculation (elastic#56671) [SIEM][Detection Engine] Critical blocker, fixes pre-packaged rule miscounts Upgrade EUI to v18.3.0 (elastic#56228) [Maps] Fix server log (elastic#56679) [SIEM] Fixes FTUE when APM node is present (elastic#56574) [Reporting/FieldFormats] expose `setFieldFormats` and call from ReportingPlugin.start (elastic#56563) Update EMS API urls for production (elastic#56657) Ability to delete alerts even when AAD is out of sync (elastic#56543) ...
Summary
Related issue #54497
Move global kibana config properties/remove
injectedMetadata
usagekibana.defaultAppId
tokibana_legacy
pluginkibana.disableWelcomeScreen
tohome.disableWelcomeScreen
in `Home plugin.Core server API changes Updates
ConfigDeprecationFactory#renameFromRoot
now allowssilent
as the third argument to mute depreciation logging.Checklist
For maintainers