-
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
Removes unused and renamed deprecated core settings and deprecated settings from core plugins #113653
Removes unused and renamed deprecated core settings and deprecated settings from core plugins #113653
Changes from all commits
d570711
2aadf93
ac97a83
71f40d3
a4234b9
d762120
8017cef
9fd64e2
7ac15e8
105b587
290b48a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,22 @@ function collectDeprecations( | |
) { | ||
const deprecations = provider(configDeprecationFactory); | ||
const deprecationMessages: string[] = []; | ||
const deprecationLevels: string[] = []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed to test changing the |
||
const { config: migrated } = applyDeprecations( | ||
settings, | ||
deprecations.map((deprecation) => ({ | ||
deprecation, | ||
path, | ||
})), | ||
() => | ||
({ message }) => | ||
deprecationMessages.push(message) | ||
({ message, level }) => { | ||
deprecationMessages.push(message); | ||
deprecationLevels.push(level ?? ''); | ||
} | ||
); | ||
return { | ||
messages: deprecationMessages, | ||
levels: deprecationLevels, | ||
migrated, | ||
}; | ||
} | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* 2.0. | ||
*/ | ||
|
||
import { get } from 'lodash'; | ||
// import { get } from 'lodash'; | ||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
import { PluginConfigDescriptor } from 'kibana/server'; | ||
import { isHexColor } from './utils'; | ||
|
@@ -39,23 +39,4 @@ export type BannersConfigType = TypeOf<typeof configSchema>; | |
export const config: PluginConfigDescriptor<BannersConfigType> = { | ||
schema: configSchema, | ||
exposeToBrowser: {}, | ||
deprecations: () => [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The unit tests only tested |
||
(rootConfig, fromPath, addDeprecation) => { | ||
const pluginConfig = get(rootConfig, fromPath); | ||
if (pluginConfig?.placement === 'header') { | ||
addDeprecation({ | ||
message: 'The `header` value for xpack.banners.placement has been replaced by `top`', | ||
correctiveActions: { | ||
manualSteps: [ | ||
`Remove "xpack.banners.placement: header" from your kibana configs.`, | ||
`Add "xpack.banners.placement: to" to your kibana configs instead.`, | ||
], | ||
}, | ||
}); | ||
return { | ||
set: [{ path: `${fromPath}.placement`, value: 'top' }], | ||
}; | ||
} | ||
}, | ||
], | ||
}; |
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 only added breaking changes for the settings that are documented.