* Track deprecated configs * PR feedback * Be more careful * Add test back in * Fix types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/actions/server/index.test.ts
This commit is contained in:
parent
31053f09e1
commit
1916ab4d43
2 changed files with 28 additions and 3 deletions
|
@ -64,7 +64,8 @@ export const config: PluginConfigDescriptor<ActionsConfig> = {
|
|||
if (
|
||||
customHostSettings.find(
|
||||
(customHostSchema: CustomHostSettings) =>
|
||||
!!customHostSchema.ssl && !!customHostSchema.ssl.rejectUnauthorized
|
||||
customHostSchema.hasOwnProperty('ssl') &&
|
||||
customHostSchema.ssl?.hasOwnProperty('rejectUnauthorized')
|
||||
)
|
||||
) {
|
||||
addDeprecation({
|
||||
|
@ -82,11 +83,18 @@ export const config: PluginConfigDescriptor<ActionsConfig> = {
|
|||
],
|
||||
},
|
||||
});
|
||||
return {
|
||||
unset: [
|
||||
{
|
||||
path: `xpack.actions.customHostSettings.ssl.rejectUnauthorized`,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
},
|
||||
(settings, fromPath, addDeprecation) => {
|
||||
const actions = get(settings, fromPath);
|
||||
if (!!actions?.rejectUnauthorized) {
|
||||
if (actions?.hasOwnProperty('rejectUnauthorized')) {
|
||||
addDeprecation({
|
||||
message:
|
||||
`"xpack.actions.rejectUnauthorized" is deprecated. Use "xpack.actions.verificationMode" instead, ` +
|
||||
|
@ -101,11 +109,18 @@ export const config: PluginConfigDescriptor<ActionsConfig> = {
|
|||
],
|
||||
},
|
||||
});
|
||||
return {
|
||||
unset: [
|
||||
{
|
||||
path: `xpack.actions.rejectUnauthorized`,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
},
|
||||
(settings, fromPath, addDeprecation) => {
|
||||
const actions = get(settings, fromPath);
|
||||
if (!!actions?.proxyRejectUnauthorizedCertificates) {
|
||||
if (actions?.hasOwnProperty('proxyRejectUnauthorizedCertificates')) {
|
||||
addDeprecation({
|
||||
message:
|
||||
`"xpack.actions.proxyRejectUnauthorizedCertificates" is deprecated. Use "xpack.actions.proxyVerificationMode" instead, ` +
|
||||
|
@ -120,6 +135,13 @@ export const config: PluginConfigDescriptor<ActionsConfig> = {
|
|||
],
|
||||
},
|
||||
});
|
||||
return {
|
||||
unset: [
|
||||
{
|
||||
path: `xpack.actions.proxyRejectUnauthorizedCertificates`,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
},
|
||||
(settings, fromPath, addDeprecation) => {
|
||||
|
|
|
@ -41,6 +41,9 @@ export type {
|
|||
|
||||
export const config: PluginConfigDescriptor<TaskManagerConfig> = {
|
||||
schema: configSchema,
|
||||
exposeToUsage: {
|
||||
max_workers: true,
|
||||
},
|
||||
deprecations: () => [
|
||||
(settings, fromPath, addDeprecation) => {
|
||||
const taskManager = get(settings, fromPath);
|
||||
|
|
Loading…
Reference in a new issue