mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Breaking] Remove deprecated enabled
settings from plugins. (#113495)
This commit is contained in:
parent
fd3379d069
commit
94aa791a49
90 changed files with 133 additions and 627 deletions
|
@ -129,13 +129,3 @@ image::dev-tools/console/images/console-settings.png["Console Settings", width=6
|
|||
|
||||
For a list of available keyboard
|
||||
shortcuts, click *Help*.
|
||||
|
||||
[float]
|
||||
[[console-settings]]
|
||||
=== Disable Console
|
||||
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
If you don’t want to use *Console*, you can disable it by setting `console.enabled`
|
||||
to `false` in your `kibana.yml` configuration file. Changing this setting
|
||||
causes the server to regenerate assets on the next startup,
|
||||
which might cause a delay before pages start being served.
|
||||
|
|
|
@ -17,6 +17,7 @@ See also <<whats-new>> and <<release-notes>>.
|
|||
//NOTE: The notable-breaking-changes tagged regions are re-used in the
|
||||
//Installation and Upgrade Guide
|
||||
|
||||
// tag::notable-breaking-changes[]
|
||||
[float]
|
||||
[[breaking_80_index_pattern_changes]]
|
||||
=== Index pattern changes
|
||||
|
@ -30,18 +31,24 @@ to function as expected. Support for these index patterns has been removed in 8.
|
|||
*Impact:* You must migrate your time_based index patterns to a wildcard pattern,
|
||||
for example, `logstash-*`.
|
||||
|
||||
|
||||
[float]
|
||||
[[breaking_80_setting_changes]]
|
||||
=== Settings changes
|
||||
|
||||
// tag::notable-breaking-changes[]
|
||||
[float]
|
||||
==== Multitenancy by changing `kibana.index` is no longer supported
|
||||
*Details:* `kibana.index`, `xpack.reporting.index` and `xpack.task_manager.index` can no longer be specified.
|
||||
|
||||
*Impact:* Users who relied on changing these settings to achieve multitenancy should use *Spaces*, cross-cluster replication, or cross-cluster search instead. To migrate to *Spaces*, users are encouraged to use saved object management to export their saved objects from a tenant into the default tenant in a space. Improvements are planned to improve on this workflow. See https://github.com/elastic/kibana/issues/82020 for more details.
|
||||
|
||||
[float]
|
||||
==== Disabling most plugins with the `{plugin_name}.enabled` setting is no longer supported
|
||||
*Details:* The ability for most plugins to be disabled using the `{plugin_name}.enabled` config option has been removed.
|
||||
|
||||
*Impact:* Some plugins, such as `telemetry`, `newsfeed`, `reporting`, and the various `vis_type` plugins will continue to support this setting, however the rest of the plugins that ship with Kibana will not. By default, any newly created plugins will not support this configuration unless it is explicitly added to the plugin's `configSchema`.
|
||||
|
||||
If you are currently using one of these settings in your Kibana config, please remove it before upgrading to 8.0. If you were using these settings to control user access to certain Kibana applications, we recommend leveraging Feature Controls instead.
|
||||
|
||||
[float]
|
||||
==== Legacy browsers are now rejected by default
|
||||
*Details:* `csp.strict` is now enabled by default, so Kibana will fail to load for older, legacy browsers that do not enforce basic Content Security Policy protections - notably Internet Explorer 11.
|
||||
|
|
|
@ -40,10 +40,6 @@ Changing these settings may disable features of the APM App.
|
|||
|
||||
[cols="2*<"]
|
||||
|===
|
||||
| `xpack.apm.enabled` {ess-icon}
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `false` to disable the APM app. Defaults to `true`.
|
||||
|
||||
| `xpack.apm.maxServiceEnvironments` {ess-icon}
|
||||
| Maximum number of unique service environments recognized by the UI. Defaults to `100`.
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[dev-settings-kb]]
|
||||
=== Development tools settings in {kib}
|
||||
++++
|
||||
<titleabbrev>Development tools settings</titleabbrev>
|
||||
++++
|
||||
|
||||
You do not need to configure any settings to use the development tools in {kib}.
|
||||
They are enabled by default.
|
||||
|
||||
[float]
|
||||
[[grok-settings]]
|
||||
==== Grok Debugger settings
|
||||
|
||||
`xpack.grokdebugger.enabled` {ess-icon}::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `true` to enable the <<xpack-grokdebugger,Grok Debugger>>. Defaults to `true`.
|
||||
|
||||
|
||||
[float]
|
||||
[[profiler-settings]]
|
||||
==== {searchprofiler} settings
|
||||
|
||||
`xpack.searchprofiler.enabled`::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `true` to enable the <<xpack-profiler,{searchprofiler}>>. Defaults to `true`.
|
||||
|
||||
[float]
|
||||
[[painless_lab-settings]]
|
||||
==== Painless Lab settings
|
||||
|
||||
`xpack.painless_lab.enabled`::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
When set to `true`, enables the <<painlesslab, Painless Lab>>. Defaults to `true`.
|
|
@ -20,9 +20,6 @@ See the {fleet-guide}/index.html[{fleet}] docs for more information.
|
|||
|
||||
[cols="2*<"]
|
||||
|===
|
||||
| `xpack.fleet.enabled` {ess-icon}
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `true` (default) to enable {fleet}.
|
||||
| `xpack.fleet.agents.enabled` {ess-icon}
|
||||
| Set to `true` (default) to enable {fleet}.
|
||||
|===
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
|
||||
`xpack.infra.enabled`::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `false` to disable the Logs and Metrics app plugin {kib}. Defaults to `true`.
|
||||
|
||||
`xpack.infra.sources.default.logAlias`::
|
||||
Index pattern for matching indices that contain log data. Defaults to `filebeat-*,kibana_sample_data_logs*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[graph-settings-kb]]
|
||||
=== Graph settings in {kib}
|
||||
++++
|
||||
<titleabbrev>Graph settings</titleabbrev>
|
||||
++++
|
||||
|
||||
You do not need to configure any settings to use the {graph-features}.
|
||||
|
||||
`xpack.graph.enabled` {ess-icon}::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `false` to disable the {graph-features}.
|
|
@ -1,26 +0,0 @@
|
|||
[role="xpack"]
|
||||
[[ml-settings-kb]]
|
||||
=== Machine learning settings in {kib}
|
||||
++++
|
||||
<titleabbrev>Machine learning settings</titleabbrev>
|
||||
++++
|
||||
|
||||
You do not need to configure any settings to use {kib} {ml-features}. They are
|
||||
enabled by default.
|
||||
|
||||
[[general-ml-settings-kb]]
|
||||
==== General {ml} settings
|
||||
|
||||
`xpack.ml.enabled` {ess-icon}::
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `true` (default) to enable {kib} {ml-features}. +
|
||||
+
|
||||
If set to `false` in `kibana.yml`, the {ml} icon is hidden in this {kib}
|
||||
instance. If `xpack.ml.enabled` is set to `true` in `elasticsearch.yml`, however,
|
||||
you can still use the {ml} APIs. To disable {ml} entirely, refer to
|
||||
{ref}/ml-settings.html[{es} {ml} settings].
|
||||
|
||||
[[advanced-ml-settings-kb]]
|
||||
==== Advanced {ml} settings
|
||||
|
||||
Refer to <<kibana-ml-settings,Advanced {ml} settings in {kib}>>.
|
|
@ -31,13 +31,6 @@ For more information, see
|
|||
|
||||
[cols="2*<"]
|
||||
|===
|
||||
| `monitoring.enabled`
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set to `true` (default) to enable the {monitor-features} in {kib}. Unlike the
|
||||
<<monitoring-ui-enabled, `monitoring.ui.enabled`>> setting, when this setting is `false`, the
|
||||
monitoring back-end does not run and {kib} stats are not sent to the monitoring
|
||||
cluster.
|
||||
|
||||
| `monitoring.ui.ccs.enabled`
|
||||
| Set to `true` (default) to enable {ref}/modules-cross-cluster-search.html[cross-cluster search] of your monitoring data. The {ref}/modules-remote-clusters.html#remote-cluster-settings[`remote_cluster_client`] role must exist on each node.
|
||||
|
||||
|
|
|
@ -13,11 +13,8 @@ For more {kib} configuration settings, see <<settings>>.
|
|||
include::alert-action-settings.asciidoc[]
|
||||
include::apm-settings.asciidoc[]
|
||||
include::banners-settings.asciidoc[]
|
||||
include::dev-settings.asciidoc[]
|
||||
include::graph-settings.asciidoc[]
|
||||
include::infrastructure-ui-settings.asciidoc[]
|
||||
include::logs-ui-settings.asciidoc[]
|
||||
include::ml-settings.asciidoc[]
|
||||
include::reporting-settings.asciidoc[]
|
||||
include::spaces-settings.asciidoc[]
|
||||
include::task-manager-settings.asciidoc[]
|
||||
|
|
|
@ -8,10 +8,6 @@ Configure the URL drilldown settings in your `kibana.yml` configuration file.
|
|||
|
||||
[cols="2*<"]
|
||||
|===
|
||||
| [[url-drilldown-enabled]] `url_drilldown.enabled`
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
When `true`, enables URL drilldowns on your {kib} instance.
|
||||
|
||||
| [[external-URL-policy]] `externalUrl.policy`
|
||||
| Configures the external URL policies. URL drilldowns respect the global *External URL* service, which you can use to deny or allow external URLs.
|
||||
By default all external URLs are allowed.
|
||||
|
|
|
@ -20,11 +20,12 @@ configuration using `${MY_ENV_VAR}` syntax.
|
|||
[cols="2*<"]
|
||||
|===
|
||||
|
||||
| `console.enabled:`
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Toggling this causes the server to regenerate assets on the next startup,
|
||||
which may cause a delay before pages start being served.
|
||||
Set to `false` to disable Console. *Default: `true`*
|
||||
| `csp.rules:`
|
||||
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
A https://w3c.github.io/webappsec-csp/[Content Security Policy] template
|
||||
that disables certain unnecessary and potentially insecure capabilities in
|
||||
the browser. It is strongly recommended that you keep the default CSP rules
|
||||
that ship with {kib}.
|
||||
|
||||
| `csp.script_src:`
|
||||
| Add sources for the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src[Content Security Policy `script-src` directive].
|
||||
|
@ -688,15 +689,6 @@ sources and images. When false, Vega can only get data from {es}. *Default: `fal
|
|||
`exploreDataInChart.enabled`
|
||||
| Enables you to view the underlying documents in a data series from a dashboard panel. *Default: `false`*
|
||||
|
||||
| `xpack.license_management.enabled`
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set this value to false to disable the License Management UI.
|
||||
*Default: `true`*
|
||||
|
||||
| `xpack.rollup.enabled:`
|
||||
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
|
||||
Set this value to false to disable the Rollup UI. *Default: true*
|
||||
|
||||
| `i18n.locale` {ess-icon}
|
||||
| Set this value to change the {kib} interface language.
|
||||
Valid locales are: `en`, `zh-CN`, `ja-JP`. *Default: `en`*
|
||||
|
@ -706,14 +698,11 @@ Valid locales are: `en`, `zh-CN`, `ja-JP`. *Default: `en`*
|
|||
include::{kib-repo-dir}/settings/alert-action-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/apm-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/banners-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/dev-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/graph-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/fleet-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/i18n-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/logging-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/logs-ui-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/infrastructure-ui-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/ml-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/monitoring-settings.asciidoc[]
|
||||
include::{kib-repo-dir}/settings/reporting-settings.asciidoc[]
|
||||
include::secure-settings.asciidoc[]
|
||||
|
|
|
@ -145,23 +145,6 @@ You can also remove a plugin manually by deleting the plugin's subdirectory unde
|
|||
|
||||
NOTE: Removing a plugin will result in an "optimize" run which will delay the next start of {kib}.
|
||||
|
||||
[float]
|
||||
[[disable-plugin]]
|
||||
== Disable plugins
|
||||
|
||||
deprecated:[7.16.0,"In 8.0 and later, this setting will only be supported for a subset of plugins that have opted in to the behavior."]
|
||||
|
||||
Use the following command to disable a plugin:
|
||||
|
||||
[source,shell]
|
||||
-----------
|
||||
./bin/kibana --<plugin ID>.enabled=false <1>
|
||||
-----------
|
||||
|
||||
NOTE: Disabling or enabling a plugin will result in an "optimize" run which will delay the start of {kib}.
|
||||
|
||||
<1> You can find a plugin's plugin ID as the value of the `name` property in the plugin's `kibana.json` file.
|
||||
|
||||
[float]
|
||||
[[configure-plugin-manager]]
|
||||
== Configure the plugin manager
|
||||
|
|
|
@ -261,42 +261,6 @@ test('correctly passes context', async () => {
|
|||
expect(await value$.pipe(first()).toPromise()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('handles enabled path, but only marks the enabled path as used', async () => {
|
||||
const initialConfig = {
|
||||
pid: {
|
||||
enabled: true,
|
||||
file: '/some/file.pid',
|
||||
},
|
||||
};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
const isEnabled = await configService.isEnabledAtPath('pid');
|
||||
expect(isEnabled).toBe(true);
|
||||
|
||||
const unusedPaths = await configService.getUnusedPaths();
|
||||
expect(unusedPaths).toEqual(['pid.file']);
|
||||
});
|
||||
|
||||
test('handles enabled path when path is array', async () => {
|
||||
const initialConfig = {
|
||||
pid: {
|
||||
enabled: true,
|
||||
file: '/some/file.pid',
|
||||
},
|
||||
};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
const isEnabled = await configService.isEnabledAtPath(['pid']);
|
||||
expect(isEnabled).toBe(true);
|
||||
|
||||
const unusedPaths = await configService.getUnusedPaths();
|
||||
expect(unusedPaths).toEqual(['pid.file']);
|
||||
});
|
||||
|
||||
test('handles disabled path and marks config as used', async () => {
|
||||
const initialConfig = {
|
||||
pid: {
|
||||
|
@ -308,6 +272,14 @@ test('handles disabled path and marks config as used', async () => {
|
|||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
configService.setSchema(
|
||||
'pid',
|
||||
schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
file: schema.string(),
|
||||
})
|
||||
);
|
||||
|
||||
const isEnabled = await configService.isEnabledAtPath('pid');
|
||||
expect(isEnabled).toBe(false);
|
||||
|
||||
|
@ -338,7 +310,7 @@ test('does not throw if schema does not define "enabled" schema', async () => {
|
|||
expect(value.enabled).toBe(undefined);
|
||||
});
|
||||
|
||||
test('treats config as enabled if config path is not present in config', async () => {
|
||||
test('treats config as enabled if config path is not present in schema', async () => {
|
||||
const initialConfig = {};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
|
@ -351,50 +323,58 @@ test('treats config as enabled if config path is not present in config', async (
|
|||
expect(unusedPaths).toEqual([]);
|
||||
});
|
||||
|
||||
test('read "enabled" even if its schema is not present', async () => {
|
||||
test('throws if reading "enabled" when it is not present in the schema', async () => {
|
||||
const initialConfig = {
|
||||
foo: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
const isEnabled = await configService.isEnabledAtPath('foo');
|
||||
expect(isEnabled).toBe(true);
|
||||
configService.setSchema(
|
||||
'foo',
|
||||
schema.object({
|
||||
bar: schema.maybe(schema.string()),
|
||||
})
|
||||
);
|
||||
|
||||
expect(
|
||||
async () => await configService.isEnabledAtPath('foo')
|
||||
).rejects.toThrowErrorMatchingInlineSnapshot(
|
||||
`"[config validation of [foo].enabled]: definition for this key is missing"`
|
||||
);
|
||||
});
|
||||
|
||||
test('logs deprecation if schema is not present and "enabled" is used', async () => {
|
||||
test('throws if reading "enabled" when no schema exists', async () => {
|
||||
const initialConfig = {
|
||||
foo: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
await configService.isEnabledAtPath('foo');
|
||||
expect(configService.getHandledDeprecatedConfigs()).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Array [
|
||||
"foo",
|
||||
Array [
|
||||
Object {
|
||||
"configPath": "foo.enabled",
|
||||
"correctiveActions": Object {
|
||||
"manualSteps": Array [
|
||||
"Remove \\"foo.enabled\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.",
|
||||
],
|
||||
},
|
||||
"message": "Configuring \\"foo.enabled\\" is deprecated and will be removed in 8.0.0.",
|
||||
"title": "Setting \\"foo.enabled\\" is deprecated",
|
||||
},
|
||||
],
|
||||
],
|
||||
]
|
||||
`);
|
||||
expect(
|
||||
async () => await configService.isEnabledAtPath('foo')
|
||||
).rejects.toThrowErrorMatchingInlineSnapshot(`"No validation schema has been defined for [foo]"`);
|
||||
});
|
||||
|
||||
test('throws if reading any config value when no schema exists', async () => {
|
||||
const initialConfig = {
|
||||
foo: {
|
||||
whatever: 'hi',
|
||||
},
|
||||
};
|
||||
|
||||
const rawConfigProvider = rawConfigServiceMock.create({ rawConfig: initialConfig });
|
||||
const configService = new ConfigService(rawConfigProvider, defaultEnv, logger);
|
||||
|
||||
expect(
|
||||
async () => await configService.isEnabledAtPath('foo')
|
||||
).rejects.toThrowErrorMatchingInlineSnapshot(`"No validation schema has been defined for [foo]"`);
|
||||
});
|
||||
|
||||
test('allows plugins to specify "enabled" flag via validation schema', async () => {
|
||||
|
@ -425,7 +405,7 @@ test('allows plugins to specify "enabled" flag via validation schema', async ()
|
|||
expect(await configService.isEnabledAtPath('baz')).toBe(true);
|
||||
});
|
||||
|
||||
test('does not throw during validation is every schema is valid', async () => {
|
||||
test('does not throw during validation if every schema is valid', async () => {
|
||||
const rawConfig = getRawConfigProvider({ stringKey: 'foo', numberKey: 42 });
|
||||
|
||||
const configService = new ConfigService(rawConfig, defaultEnv, logger);
|
||||
|
@ -435,7 +415,7 @@ test('does not throw during validation is every schema is valid', async () => {
|
|||
await expect(configService.validate()).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
test('throws during validation is any schema is invalid', async () => {
|
||||
test('throws during validation if any schema is invalid', async () => {
|
||||
const rawConfig = getRawConfigProvider({ stringKey: 123, numberKey: 42 });
|
||||
|
||||
const configService = new ConfigService(rawConfig, defaultEnv, logger);
|
||||
|
|
|
@ -168,51 +168,29 @@ export class ConfigService {
|
|||
|
||||
public async isEnabledAtPath(path: ConfigPath) {
|
||||
const namespace = pathToString(path);
|
||||
const hasSchema = this.schemas.has(namespace);
|
||||
|
||||
const validatedConfig = this.schemas.has(namespace)
|
||||
const config = await this.config$.pipe(first()).toPromise();
|
||||
if (!hasSchema && config.has(path)) {
|
||||
// Throw if there is no schema, but a config exists at the path.
|
||||
throw new Error(`No validation schema has been defined for [${namespace}]`);
|
||||
}
|
||||
|
||||
const validatedConfig = hasSchema
|
||||
? await this.atPath<{ enabled?: boolean }>(path).pipe(first()).toPromise()
|
||||
: undefined;
|
||||
|
||||
const enabledPath = createPluginEnabledPath(path);
|
||||
const config = await this.config$.pipe(first()).toPromise();
|
||||
|
||||
// if plugin hasn't got a config schema, we try to read "enabled" directly
|
||||
const isEnabled = validatedConfig?.enabled ?? config.get(enabledPath);
|
||||
|
||||
// if we implicitly added an `enabled` config to a plugin without a schema,
|
||||
// we log a deprecation warning, as this will not be supported in 8.0
|
||||
if (validatedConfig?.enabled === undefined && isEnabled !== undefined) {
|
||||
const deprecationPath = pathToString(enabledPath);
|
||||
const deprecatedConfigDetails: DeprecatedConfigDetails = {
|
||||
configPath: deprecationPath,
|
||||
title: `Setting "${deprecationPath}" is deprecated`,
|
||||
message: `Configuring "${deprecationPath}" is deprecated and will be removed in 8.0.0.`,
|
||||
correctiveActions: {
|
||||
manualSteps: [
|
||||
`Remove "${deprecationPath}" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.`,
|
||||
],
|
||||
},
|
||||
};
|
||||
this.deprecationLog.warn(deprecatedConfigDetails.message);
|
||||
this.markDeprecatedConfigAsHandled(namespace, deprecatedConfigDetails);
|
||||
}
|
||||
|
||||
// not declared. consider that plugin is enabled by default
|
||||
if (isEnabled === undefined) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isEnabled === false) {
|
||||
// If the plugin is _not_ enabled, we mark the entire plugin path as
|
||||
// handled, as it's expected that it won't be used.
|
||||
const isDisabled = validatedConfig?.enabled === false;
|
||||
if (isDisabled) {
|
||||
// If the plugin is explicitly disabled, we mark the entire plugin
|
||||
// path as handled, as it's expected that it won't be used.
|
||||
this.markAsHandled(path);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If plugin enabled we mark the enabled path as handled, as we for example
|
||||
// can have plugins that don't have _any_ config except for this field, and
|
||||
// therefore have no reason to try to get the config.
|
||||
this.markAsHandled(enabledPath);
|
||||
// If the schema exists and the config is explicitly set to true,
|
||||
// _or_ if the `enabled` config is undefined, then we treat the
|
||||
// plugin as enabled.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -286,13 +264,6 @@ export class ConfigService {
|
|||
}
|
||||
}
|
||||
|
||||
const createPluginEnabledPath = (configPath: string | string[]) => {
|
||||
if (Array.isArray(configPath)) {
|
||||
return configPath.concat('enabled');
|
||||
}
|
||||
return `${configPath}.enabled`;
|
||||
};
|
||||
|
||||
const pathToString = (path: ConfigPath) => (Array.isArray(path) ? path.join('.') : path);
|
||||
|
||||
/**
|
||||
|
|
|
@ -106,7 +106,7 @@ export interface ConfigDeprecationCommand {
|
|||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const provider: ConfigDeprecationProvider = ({ rename, unused }) => [
|
||||
* const provider: ConfigDeprecationProvider = ({ deprecate, rename, unused }) => [
|
||||
* deprecate('deprecatedKey', '8.0.0'),
|
||||
* rename('oldKey', 'newKey'),
|
||||
* unused('deprecatedKey'),
|
||||
|
@ -164,7 +164,7 @@ export interface ConfigDeprecationFactory {
|
|||
* @example
|
||||
* Log a deprecation warning indicating 'myplugin.deprecatedKey' should be removed by `8.0.0`
|
||||
* ```typescript
|
||||
* const provider: ConfigDeprecationProvider = ({ deprecate }) => [
|
||||
* const provider: ConfigDeprecationProvider = ({ deprecateFromRoot }) => [
|
||||
* deprecateFromRoot('deprecatedKey', '8.0.0'),
|
||||
* ]
|
||||
* ```
|
||||
|
|
|
@ -1066,32 +1066,46 @@ describe('PluginsService', () => {
|
|||
|
||||
describe('plugin initialization', () => {
|
||||
beforeEach(() => {
|
||||
const prebootPlugins = [
|
||||
createPlugin('plugin-1-preboot', {
|
||||
type: PluginType.preboot,
|
||||
path: 'path-1-preboot',
|
||||
version: 'version-1',
|
||||
}),
|
||||
createPlugin('plugin-2-preboot', {
|
||||
type: PluginType.preboot,
|
||||
path: 'path-2-preboot',
|
||||
version: 'version-2',
|
||||
}),
|
||||
];
|
||||
const standardPlugins = [
|
||||
createPlugin('plugin-1-standard', {
|
||||
path: 'path-1-standard',
|
||||
version: 'version-1',
|
||||
}),
|
||||
createPlugin('plugin-2-standard', {
|
||||
path: 'path-2-standard',
|
||||
version: 'version-2',
|
||||
}),
|
||||
];
|
||||
|
||||
for (const plugin of [...prebootPlugins, ...standardPlugins]) {
|
||||
jest.doMock(
|
||||
join(plugin.path, 'server'),
|
||||
() => ({
|
||||
config: {
|
||||
schema: schema.object({
|
||||
enabled: schema.maybe(schema.boolean({ defaultValue: true })),
|
||||
}),
|
||||
},
|
||||
}),
|
||||
{ virtual: true }
|
||||
);
|
||||
}
|
||||
|
||||
mockDiscover.mockReturnValue({
|
||||
error$: from([]),
|
||||
plugin$: from([
|
||||
createPlugin('plugin-1-preboot', {
|
||||
type: PluginType.preboot,
|
||||
path: 'path-1-preboot',
|
||||
version: 'version-1',
|
||||
configPath: 'plugin1_preboot',
|
||||
}),
|
||||
createPlugin('plugin-1-standard', {
|
||||
path: 'path-1-standard',
|
||||
version: 'version-1',
|
||||
configPath: 'plugin1_standard',
|
||||
}),
|
||||
createPlugin('plugin-2-preboot', {
|
||||
type: PluginType.preboot,
|
||||
path: 'path-2-preboot',
|
||||
version: 'version-2',
|
||||
configPath: 'plugin2_preboot',
|
||||
}),
|
||||
createPlugin('plugin-2-standard', {
|
||||
path: 'path-2-standard',
|
||||
version: 'version-2',
|
||||
configPath: 'plugin2_standard',
|
||||
}),
|
||||
]),
|
||||
plugin$: from([...prebootPlugins, ...standardPlugins]),
|
||||
});
|
||||
|
||||
prebootMockPluginSystem.uiPlugins.mockReturnValue(new Map());
|
||||
|
|
|
@ -23,7 +23,6 @@ kibana_vars=(
|
|||
apm_oss.sourcemapIndices
|
||||
apm_oss.spanIndices
|
||||
apm_oss.transactionIndices
|
||||
console.enabled
|
||||
console.proxyConfig
|
||||
console.proxyFilter
|
||||
csp.strict
|
||||
|
@ -66,7 +65,6 @@ kibana_vars=(
|
|||
elasticsearch.username
|
||||
enterpriseSearch.accessCheckTimeout
|
||||
enterpriseSearch.accessCheckTimeoutWarning
|
||||
enterpriseSearch.enabled
|
||||
enterpriseSearch.host
|
||||
externalUrl.policy
|
||||
i18n.locale
|
||||
|
@ -102,7 +100,6 @@ kibana_vars=(
|
|||
migrations.scrollDuration
|
||||
migrations.skip
|
||||
monitoring.cluster_alerts.email_notifications.email_address
|
||||
monitoring.enabled
|
||||
monitoring.kibana.collection.enabled
|
||||
monitoring.kibana.collection.interval
|
||||
monitoring.ui.container.elasticsearch.enabled
|
||||
|
@ -184,7 +181,6 @@ kibana_vars=(
|
|||
tilemap.options.minZoom
|
||||
tilemap.options.subdomains
|
||||
tilemap.url
|
||||
url_drilldown.enabled
|
||||
vega.enableExternalUrls
|
||||
vis_type_vega.enableExternalUrls
|
||||
xpack.actions.allowedHosts
|
||||
|
@ -209,7 +205,6 @@ kibana_vars=(
|
|||
xpack.alerts.healthCheck.interval
|
||||
xpack.alerts.invalidateApiKeysTask.interval
|
||||
xpack.alerts.invalidateApiKeysTask.removalDelay
|
||||
xpack.apm.enabled
|
||||
xpack.apm.indices.error
|
||||
xpack.apm.indices.metric
|
||||
xpack.apm.indices.onboarding
|
||||
|
@ -229,7 +224,6 @@ kibana_vars=(
|
|||
xpack.banners.placement
|
||||
xpack.banners.textColor
|
||||
xpack.banners.textContent
|
||||
xpack.canvas.enabled
|
||||
xpack.code.disk.thresholdEnabled
|
||||
xpack.code.disk.watermarkLow
|
||||
xpack.code.indexRepoFrequencyMs
|
||||
|
@ -261,14 +255,10 @@ kibana_vars=(
|
|||
xpack.fleet.agents.fleet_server.hosts
|
||||
xpack.fleet.agents.kibana.host
|
||||
xpack.fleet.agents.tlsCheckDisabled
|
||||
xpack.fleet.enabled
|
||||
xpack.fleet.packages
|
||||
xpack.fleet.registryUrl
|
||||
xpack.graph.canEditDrillDownUrls
|
||||
xpack.graph.enabled
|
||||
xpack.graph.savePolicy
|
||||
xpack.grokdebugger.enabled
|
||||
xpack.infra.enabled
|
||||
xpack.infra.query.partitionFactor
|
||||
xpack.infra.query.partitionSize
|
||||
xpack.infra.sources.default.fields.container
|
||||
|
@ -281,13 +271,9 @@ kibana_vars=(
|
|||
xpack.infra.sources.default.metricAlias
|
||||
xpack.ingestManager.fleet.tlsCheckDisabled
|
||||
xpack.ingestManager.registryUrl
|
||||
xpack.license_management.enabled
|
||||
xpack.maps.enabled
|
||||
xpack.ml.enabled
|
||||
xpack.observability.annotations.index
|
||||
xpack.observability.unsafe.alertingExperience.enabled
|
||||
xpack.observability.unsafe.cases.enabled
|
||||
xpack.painless_lab.enabled
|
||||
xpack.reporting.capture.browser.autoDownload
|
||||
xpack.reporting.capture.browser.chromium.disableSandbox
|
||||
xpack.reporting.capture.browser.chromium.inspect
|
||||
|
@ -333,9 +319,7 @@ kibana_vars=(
|
|||
xpack.reporting.queue.timeout
|
||||
xpack.reporting.roles.allow
|
||||
xpack.reporting.roles.enabled
|
||||
xpack.rollup.enabled
|
||||
xpack.ruleRegistry.write.enabled
|
||||
xpack.searchprofiler.enabled
|
||||
xpack.security.audit.appender.fileName
|
||||
xpack.security.audit.appender.layout.highlight
|
||||
xpack.security.audit.appender.layout.pattern
|
||||
|
|
|
@ -46,9 +46,7 @@ export default async function ({ readConfigFile }) {
|
|||
|
||||
// to be re-enabled once kibana/issues/102552 is completed
|
||||
'--xpack.security.enabled=false',
|
||||
'--monitoring.enabled=false',
|
||||
'--xpack.reporting.enabled=false',
|
||||
'--enterpriseSearch.enabled=false',
|
||||
],
|
||||
},
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import { APMPlugin } from './plugin';
|
|||
// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/master/docs/settings/apm-settings.asciidoc
|
||||
// and be included on cloud allow list unless there are specific reasons not to
|
||||
const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
serviceMapEnabled: schema.boolean({ defaultValue: true }),
|
||||
serviceMapFingerprintBucketSize: schema.number({ defaultValue: 100 }),
|
||||
serviceMapTraceIdBucketSize: schema.number({ defaultValue: 65 }),
|
||||
|
@ -60,13 +59,7 @@ const configSchema = schema.object({
|
|||
|
||||
// plugin config
|
||||
export const config: PluginConfigDescriptor<APMConfig> = {
|
||||
deprecations: ({
|
||||
deprecate,
|
||||
renameFromRoot,
|
||||
deprecateFromRoot,
|
||||
unusedFromRoot,
|
||||
}) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
deprecations: ({ renameFromRoot, deprecateFromRoot, unusedFromRoot }) => [
|
||||
renameFromRoot(
|
||||
'apm_oss.transactionIndices',
|
||||
'xpack.apm.indices.transaction'
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
markdownPlugins: schema.object({
|
||||
lens: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
|
|
|
@ -15,8 +15,7 @@ export const config: PluginConfigDescriptor<ConfigType> = {
|
|||
exposeToBrowser: {
|
||||
markdownPlugins: true,
|
||||
},
|
||||
deprecations: ({ deprecate, renameFromRoot }) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
deprecations: ({ renameFromRoot }) => [
|
||||
renameFromRoot('xpack.case.enabled', 'xpack.cases.enabled'),
|
||||
],
|
||||
};
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
} from '../../actions/server';
|
||||
import { APP_ID, ENABLE_CASE_CONNECTOR } from '../common';
|
||||
|
||||
import { ConfigType } from './config';
|
||||
import { initCaseApi } from './routes/api';
|
||||
import {
|
||||
createCaseCommentSavedObjectType,
|
||||
|
@ -34,10 +33,6 @@ import { SpacesPluginStart } from '../../spaces/server';
|
|||
import { PluginStartContract as FeaturesPluginStart } from '../../features/server';
|
||||
import { LensServerPluginSetup } from '../../lens/server';
|
||||
|
||||
function createConfig(context: PluginInitializerContext) {
|
||||
return context.config.get<ConfigType>();
|
||||
}
|
||||
|
||||
export interface PluginsSetup {
|
||||
security?: SecurityPluginSetup;
|
||||
actions: ActionsPluginSetup;
|
||||
|
@ -76,12 +71,6 @@ export class CasePlugin {
|
|||
}
|
||||
|
||||
public setup(core: CoreSetup, plugins: PluginsSetup) {
|
||||
const config = createConfig(this.initializerContext);
|
||||
|
||||
if (!config.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.securityPluginSetup = plugins.security;
|
||||
this.lensEmbeddableFactory = plugins.lens.lensEmbeddableFactory;
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ const fullStoryConfigSchema = schema.object({
|
|||
});
|
||||
|
||||
const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
id: schema.maybe(schema.string()),
|
||||
apm: schema.maybe(apmConfigSchema),
|
||||
cname: schema.maybe(schema.string()),
|
||||
|
@ -52,6 +51,5 @@ export const config: PluginConfigDescriptor<CloudConfigType> = {
|
|||
organization_url: true,
|
||||
full_story: true,
|
||||
},
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: configSchema,
|
||||
};
|
||||
|
|
|
@ -11,7 +11,6 @@ describe('config schema', () => {
|
|||
it('generates proper defaults', () => {
|
||||
expect(ConfigSchema.validate({})).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"enabled": true,
|
||||
"encryptionKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"keyRotation": Object {
|
||||
"decryptionOnlyKeys": Array [],
|
||||
|
@ -21,7 +20,6 @@ describe('config schema', () => {
|
|||
|
||||
expect(ConfigSchema.validate({}, { dist: false })).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"enabled": true,
|
||||
"encryptionKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"keyRotation": Object {
|
||||
"decryptionOnlyKeys": Array [],
|
||||
|
@ -32,7 +30,6 @@ describe('config schema', () => {
|
|||
expect(ConfigSchema.validate({ encryptionKey: 'z'.repeat(32) }, { dist: true }))
|
||||
.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"enabled": true,
|
||||
"encryptionKey": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
|
||||
"keyRotation": Object {
|
||||
"decryptionOnlyKeys": Array [],
|
||||
|
@ -42,7 +39,6 @@ describe('config schema', () => {
|
|||
|
||||
expect(ConfigSchema.validate({}, { dist: true })).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"enabled": true,
|
||||
"keyRotation": Object {
|
||||
"decryptionOnlyKeys": Array [],
|
||||
},
|
||||
|
@ -61,7 +57,6 @@ describe('config schema', () => {
|
|||
)
|
||||
).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"enabled": true,
|
||||
"encryptionKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"keyRotation": Object {
|
||||
"decryptionOnlyKeys": Array [
|
||||
|
|
|
@ -12,7 +12,6 @@ export type ConfigType = TypeOf<typeof ConfigSchema>;
|
|||
|
||||
export const ConfigSchema = schema.object(
|
||||
{
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
encryptionKey: schema.conditional(
|
||||
schema.contextRef('dist'),
|
||||
true,
|
||||
|
|
|
@ -17,7 +17,6 @@ export type { IsMigrationNeededPredicate } from './create_migration';
|
|||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
schema: ConfigSchema,
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
export const plugin = (initializerContext: PluginInitializerContext) =>
|
||||
new EncryptedSavedObjectsPlugin(initializerContext);
|
||||
|
|
|
@ -19,7 +19,6 @@ export const mockRequestHandler = {
|
|||
};
|
||||
|
||||
export const mockConfig = {
|
||||
enabled: true,
|
||||
host: 'http://localhost:3002',
|
||||
accessCheckTimeout: 5000,
|
||||
accessCheckTimeoutWarning: 300,
|
||||
|
|
|
@ -16,7 +16,6 @@ export const plugin = (initializerContext: PluginInitializerContext) => {
|
|||
|
||||
export const configSchema = schema.object({
|
||||
host: schema.maybe(schema.string()),
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
accessCheckTimeout: schema.number({ defaultValue: 5000 }),
|
||||
accessCheckTimeoutWarning: schema.number({ defaultValue: 300 }),
|
||||
ssl: schema.object({
|
||||
|
@ -37,5 +36,4 @@ export const config: PluginConfigDescriptor<ConfigType> = {
|
|||
exposeToBrowser: {
|
||||
host: true,
|
||||
},
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
|
|
@ -43,8 +43,7 @@ export const config: PluginConfigDescriptor = {
|
|||
epm: true,
|
||||
agents: true,
|
||||
},
|
||||
deprecations: ({ deprecate, renameFromRoot, unused, unusedFromRoot }) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
deprecations: ({ renameFromRoot, unused, unusedFromRoot }) => [
|
||||
// Fleet plugin was named ingestManager before
|
||||
renameFromRoot('xpack.ingestManager.enabled', 'xpack.fleet.enabled'),
|
||||
renameFromRoot('xpack.ingestManager.registryUrl', 'xpack.fleet.registryUrl'),
|
||||
|
@ -103,7 +102,6 @@ export const config: PluginConfigDescriptor = {
|
|||
},
|
||||
],
|
||||
schema: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
registryUrl: schema.maybe(schema.uri({ scheme: ['http', 'https'] })),
|
||||
registryProxyUrl: schema.maybe(schema.uri({ scheme: ['http', 'https'] })),
|
||||
agents: schema.object({
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
savePolicy: schema.oneOf(
|
||||
[
|
||||
schema.literal('none'),
|
||||
|
|
|
@ -18,5 +18,4 @@ export const config: PluginConfigDescriptor<ConfigSchema> = {
|
|||
savePolicy: true,
|
||||
},
|
||||
schema: configSchema,
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
|
|
@ -43,7 +43,6 @@ import { RulesService } from './services/rules';
|
|||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
schema: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
inventory: schema.object({
|
||||
compositeSize: schema.number({ defaultValue: 2000 }),
|
||||
}),
|
||||
|
@ -68,7 +67,6 @@ export const config: PluginConfigDescriptor = {
|
|||
})
|
||||
),
|
||||
}),
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
||||
export type InfraConfig = TypeOf<typeof config.schema>;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
});
|
||||
|
||||
export type ConfigSchema = TypeOf<typeof configSchema>;
|
|
@ -8,19 +8,12 @@
|
|||
// TODO: https://github.com/elastic/kibana/issues/110891
|
||||
/* eslint-disable @kbn/eslint/no_export_all */
|
||||
|
||||
import { PluginInitializerContext, PluginConfigDescriptor } from 'kibana/server';
|
||||
import { PluginInitializerContext } from 'kibana/server';
|
||||
import { LensServerPlugin } from './plugin';
|
||||
|
||||
export type { LensServerPluginSetup } from './plugin';
|
||||
export * from './plugin';
|
||||
export * from './migrations/types';
|
||||
|
||||
import { configSchema, ConfigSchema } from '../config';
|
||||
|
||||
export const config: PluginConfigDescriptor<ConfigSchema> = {
|
||||
schema: configSchema,
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
||||
export const plugin = (initializerContext: PluginInitializerContext) =>
|
||||
new LensServerPlugin(initializerContext);
|
||||
|
|
|
@ -21,7 +21,6 @@ export const getConfigMock = (): Partial<ConfigType> => ({
|
|||
});
|
||||
|
||||
export const getConfigMockDecoded = (): ConfigType => ({
|
||||
enabled: true,
|
||||
importBufferSize: IMPORT_BUFFER_SIZE,
|
||||
importTimeout: IMPORT_TIMEOUT,
|
||||
listIndex: LIST_INDEX,
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { TypeOf, schema } from '@kbn/config-schema';
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
importBufferSize: schema.number({ defaultValue: 1000, min: 1 }),
|
||||
importTimeout: schema.duration({
|
||||
defaultValue: '5m',
|
||||
|
|
|
@ -20,7 +20,6 @@ export { ExceptionListClient } from './services/exception_lists/exception_list_c
|
|||
export type { ListPluginSetup, ListsApiRequestHandlerContext } from './types';
|
||||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: ConfigSchema,
|
||||
};
|
||||
export const plugin = (initializerContext: PluginInitializerContext): ListPlugin =>
|
||||
|
|
|
@ -66,7 +66,6 @@ export class ListClientMock extends ListClient {
|
|||
export const getListClientMock = (): ListClient => {
|
||||
const mock = new ListClientMock({
|
||||
config: {
|
||||
enabled: true,
|
||||
importBufferSize: IMPORT_BUFFER_SIZE,
|
||||
importTimeout: IMPORT_TIMEOUT,
|
||||
listIndex: LIST_INDEX,
|
||||
|
|
|
@ -5,15 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { schema } from '@kbn/config-schema';
|
||||
import { PluginInitializerContext, PluginConfigDescriptor } from 'src/core/server';
|
||||
import { PluginInitializerContext } from 'src/core/server';
|
||||
import { LogstashPlugin } from './plugin';
|
||||
|
||||
export const plugin = (context: PluginInitializerContext) => new LogstashPlugin(context);
|
||||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
schema: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
import { schema, TypeOf } from '@kbn/config-schema';
|
||||
|
||||
export interface MapsConfigType {
|
||||
enabled: boolean;
|
||||
showMapsInspectorAdapter: boolean;
|
||||
preserveDrawingBuffer: boolean;
|
||||
}
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
// flag used in functional testing
|
||||
showMapsInspectorAdapter: schema.boolean({ defaultValue: false }),
|
||||
// flag used in functional testing
|
||||
|
|
|
@ -17,13 +17,11 @@ export const config: PluginConfigDescriptor<MapsXPackConfig> = {
|
|||
// exposeToBrowser specifies kibana.yml settings to expose to the browser
|
||||
// the value `true` in this context signals configuration is exposed to browser
|
||||
exposeToBrowser: {
|
||||
enabled: true,
|
||||
showMapsInspectorAdapter: true,
|
||||
preserveDrawingBuffer: true,
|
||||
},
|
||||
schema: configSchema,
|
||||
deprecations: ({ deprecate }) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
deprecations: () => [
|
||||
(
|
||||
completeConfig: Record<string, any>,
|
||||
rootPath: string,
|
||||
|
|
|
@ -138,15 +138,6 @@ export class MapsPlugin implements Plugin {
|
|||
const { usageCollection, home, licensing, features, mapsEms } = plugins;
|
||||
const mapsEmsConfig = mapsEms.config;
|
||||
const config$ = this._initializerContext.config.create();
|
||||
const currentConfig = this._initializerContext.config.get();
|
||||
|
||||
// @ts-ignore
|
||||
const mapsEnabled = currentConfig.enabled;
|
||||
// TODO: Consider dynamic way to disable maps app on config change
|
||||
if (!mapsEnabled) {
|
||||
this._logger.warn('Maps app disabled by configuration');
|
||||
return;
|
||||
}
|
||||
|
||||
let isEnterprisePlus = false;
|
||||
let lastLicenseId: string | undefined;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { TypeOf, schema } from '@kbn/config-schema';
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
});
|
||||
|
||||
export type ConfigType = TypeOf<typeof ConfigSchema>;
|
|
@ -5,18 +5,13 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { PluginConfigDescriptor, PluginInitializerContext } from '../../../../src/core/server';
|
||||
import { PluginInitializerContext } from '../../../../src/core/server';
|
||||
|
||||
import { ConfigSchema } from './config';
|
||||
import { MetricsEntitiesPlugin } from './plugin';
|
||||
|
||||
// This exports static code and TypeScript types,
|
||||
// as well as, Kibana Platform `plugin()` initializer.
|
||||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: ConfigSchema,
|
||||
};
|
||||
export const plugin = (initializerContext: PluginInitializerContext): MetricsEntitiesPlugin => {
|
||||
return new MetricsEntitiesPlugin(initializerContext);
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ export class MonitoringPlugin
|
|||
});
|
||||
const monitoring = this.initializerContext.config.get();
|
||||
|
||||
if (!monitoring.ui.enabled || !monitoring.enabled) {
|
||||
if (!monitoring.ui.enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ describe('config schema', () => {
|
|||
},
|
||||
"enabled": true,
|
||||
},
|
||||
"enabled": true,
|
||||
"kibana": Object {
|
||||
"collection": Object {
|
||||
"enabled": true,
|
||||
|
|
|
@ -22,7 +22,6 @@ export const monitoringElasticsearchConfigSchema = elasticsearchConfigSchema.ext
|
|||
});
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
ui: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
debug_mode: schema.boolean({ defaultValue: false }),
|
||||
|
|
|
@ -18,12 +18,10 @@ import { CLUSTER_ALERTS_ADDRESS_CONFIG_KEY } from '../common/constants';
|
|||
* @return {Array} array of rename operations and callback function for rename logging
|
||||
*/
|
||||
export const deprecations = ({
|
||||
deprecate,
|
||||
rename,
|
||||
renameFromRoot,
|
||||
}: ConfigDeprecationFactory): ConfigDeprecation[] => {
|
||||
return [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
// This order matters. The "blanket rename" needs to happen at the end
|
||||
renameFromRoot('xpack.monitoring.max_bucket_size', 'monitoring.ui.max_bucket_size'),
|
||||
renameFromRoot('xpack.monitoring.min_interval_seconds', 'monitoring.ui.min_interval_seconds'),
|
||||
|
|
|
@ -20,7 +20,6 @@ export const config: PluginConfigDescriptor<TypeOf<typeof configSchema>> = {
|
|||
schema: configSchema,
|
||||
deprecations,
|
||||
exposeToBrowser: {
|
||||
enabled: true,
|
||||
ui: true,
|
||||
kibana: true,
|
||||
},
|
||||
|
|
|
@ -24,7 +24,6 @@ export const config: PluginConfigDescriptor = {
|
|||
unsafe: true,
|
||||
},
|
||||
schema: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
annotations: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
index: schema.string({ defaultValue: 'observability-annotations' }),
|
||||
|
@ -34,7 +33,6 @@ export const config: PluginConfigDescriptor = {
|
|||
cases: schema.object({ enabled: schema.boolean({ defaultValue: false }) }),
|
||||
}),
|
||||
}),
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
};
|
||||
|
||||
export type ObservabilityConfig = TypeOf<typeof config.schema>;
|
||||
|
|
|
@ -37,18 +37,6 @@ export class OsqueryPlugin implements Plugin<OsqueryPluginSetup, OsqueryPluginSt
|
|||
}
|
||||
|
||||
public setup(core: CoreSetup): OsqueryPluginSetup {
|
||||
const config = this.initializerContext.config.get<{
|
||||
enabled: boolean;
|
||||
actionEnabled: boolean;
|
||||
scheduledQueries: boolean;
|
||||
savedQueries: boolean;
|
||||
packs: boolean;
|
||||
}>();
|
||||
|
||||
if (!config.enabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const storage = this.storage;
|
||||
const kibanaVersion = this.kibanaVersion;
|
||||
// Register an application into the side navigation menu
|
||||
|
@ -78,18 +66,6 @@ export class OsqueryPlugin implements Plugin<OsqueryPluginSetup, OsqueryPluginSt
|
|||
}
|
||||
|
||||
public start(core: CoreStart, plugins: StartPlugins): OsqueryPluginStart {
|
||||
const config = this.initializerContext.config.get<{
|
||||
enabled: boolean;
|
||||
actionEnabled: boolean;
|
||||
scheduledQueries: boolean;
|
||||
savedQueries: boolean;
|
||||
packs: boolean;
|
||||
}>();
|
||||
|
||||
if (!config.enabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (plugins.fleet) {
|
||||
const { registerExtension } = plugins.fleet;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import { TypeOf, schema } from '@kbn/config-schema';
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
actionEnabled: schema.boolean({ defaultValue: false }),
|
||||
savedQueries: schema.boolean({ defaultValue: true }),
|
||||
packs: schema.boolean({ defaultValue: false }),
|
||||
|
|
|
@ -10,10 +10,8 @@ import { OsqueryPlugin } from './plugin';
|
|||
import { ConfigSchema, ConfigType } from './config';
|
||||
|
||||
export const config: PluginConfigDescriptor<ConfigType> = {
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: ConfigSchema,
|
||||
exposeToBrowser: {
|
||||
enabled: true,
|
||||
actionEnabled: true,
|
||||
savedQueries: true,
|
||||
packs: true,
|
||||
|
|
|
@ -205,10 +205,6 @@ export class OsqueryPlugin implements Plugin<OsqueryPluginSetup, OsqueryPluginSt
|
|||
this.logger.debug('osquery: Setup');
|
||||
const config = createConfig(this.initializerContext);
|
||||
|
||||
if (!config.enabled) {
|
||||
return {};
|
||||
}
|
||||
|
||||
registerFeatures(plugins.features);
|
||||
|
||||
const router = core.http.createRouter();
|
||||
|
|
|
@ -9,12 +9,8 @@ import { schema, TypeOf } from '@kbn/config-schema';
|
|||
import { PluginConfigDescriptor } from 'src/core/server';
|
||||
|
||||
export const config: PluginConfigDescriptor = {
|
||||
deprecations: ({ deprecate, unused }) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
unused('unsafe.indexUpgrade.enabled'),
|
||||
],
|
||||
deprecations: ({ deprecate, unused }) => [unused('unsafe.indexUpgrade.enabled')],
|
||||
schema: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
write: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
}),
|
||||
|
|
|
@ -9,14 +9,12 @@ import { schema, TypeOf } from '@kbn/config-schema';
|
|||
import { PluginConfigDescriptor } from 'kibana/server';
|
||||
|
||||
const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
cache_refresh_interval: schema.duration({ defaultValue: '15m' }),
|
||||
});
|
||||
|
||||
export type SavedObjectsTaggingConfigType = TypeOf<typeof configSchema>;
|
||||
|
||||
export const config: PluginConfigDescriptor<SavedObjectsTaggingConfigType> = {
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: configSchema,
|
||||
exposeToBrowser: {
|
||||
cache_refresh_interval: true,
|
||||
|
|
|
@ -17,7 +17,6 @@ import { UnderlyingLogClient } from './lib/detection_engine/rule_execution_log/t
|
|||
const allowedExperimentalValues = getExperimentalAllowedValues();
|
||||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
maxRuleImportExportSize: schema.number({ defaultValue: 10000 }),
|
||||
maxRuleImportPayloadBytes: schema.number({ defaultValue: 10485760 }),
|
||||
maxTimelineImportExportSize: schema.number({ defaultValue: 10000 }),
|
||||
|
|
|
@ -20,8 +20,7 @@ export const config: PluginConfigDescriptor<ConfigType> = {
|
|||
enableExperimental: true,
|
||||
},
|
||||
schema: configSchema,
|
||||
deprecations: ({ deprecate, renameFromRoot }) => [
|
||||
deprecate('enabled', '8.0.0'),
|
||||
deprecations: ({ renameFromRoot }) => [
|
||||
renameFromRoot('xpack.siem.enabled', 'xpack.securitySolution.enabled'),
|
||||
renameFromRoot(
|
||||
'xpack.siem.maxRuleImportExportSize',
|
||||
|
|
|
@ -16,7 +16,6 @@ import { UnderlyingLogClient } from '../../rule_execution_log/types';
|
|||
export { requestMock, requestContextMock, responseMock, serverMock };
|
||||
|
||||
export const createMockConfig = (): ConfigType => ({
|
||||
enabled: true,
|
||||
[SIGNALS_INDEX_KEY]: DEFAULT_SIGNALS_INDEX,
|
||||
maxRuleImportExportSize: 10000,
|
||||
maxRuleImportPayloadBytes: 10485760,
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
import { createContext } from 'react';
|
||||
|
||||
import { PluginInitializerContext } from '../../../../src/core/public';
|
||||
|
||||
import { TimelinesPlugin } from './plugin';
|
||||
import type { StatefulEventContextType } from './types';
|
||||
export * as tGridActions from './store/t_grid/actions';
|
||||
|
@ -63,8 +61,8 @@ export { StatefulFieldsBrowser } from './components/t_grid/toolbar/fields_browse
|
|||
export { useStatusBulkActionItems } from './hooks/use_status_bulk_action_items';
|
||||
// This exports static code and TypeScript types,
|
||||
// as well as, Kibana Platform `plugin()` initializer.
|
||||
export function plugin(initializerContext: PluginInitializerContext) {
|
||||
return new TimelinesPlugin(initializerContext);
|
||||
export function plugin() {
|
||||
return new TimelinesPlugin();
|
||||
}
|
||||
|
||||
export const StatefulEventContext = createContext<StatefulEventContextType | null>(null);
|
||||
|
|
|
@ -8,12 +8,7 @@
|
|||
import { Store } from 'redux';
|
||||
|
||||
import { Storage } from '../../../../src/plugins/kibana_utils/public';
|
||||
import type {
|
||||
CoreSetup,
|
||||
Plugin,
|
||||
PluginInitializerContext,
|
||||
CoreStart,
|
||||
} from '../../../../src/core/public';
|
||||
import type { CoreSetup, Plugin, CoreStart } from '../../../../src/core/public';
|
||||
import type { LastUpdatedAtProps, LoadingPanelProps, FieldBrowserProps } from './components';
|
||||
import {
|
||||
getLastUpdatedLazy,
|
||||
|
@ -32,17 +27,12 @@ import { useAddToTimeline, useAddToTimelineSensor } from './hooks/use_add_to_tim
|
|||
import { getHoverActions } from './components/hover_actions';
|
||||
|
||||
export class TimelinesPlugin implements Plugin<void, TimelinesUIStart> {
|
||||
constructor(private readonly initializerContext: PluginInitializerContext) {}
|
||||
private _store: Store | undefined;
|
||||
private _storage = new Storage(localStorage);
|
||||
|
||||
public setup(core: CoreSetup) {}
|
||||
|
||||
public start(core: CoreStart, { data }: TimelinesStartPlugins): TimelinesUIStart {
|
||||
const config = this.initializerContext.config.get<{ enabled: boolean }>();
|
||||
if (!config.enabled) {
|
||||
return {} as TimelinesUIStart;
|
||||
}
|
||||
return {
|
||||
getHoverActions: () => {
|
||||
return getHoverActions(this._store);
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { TypeOf, schema } from '@kbn/config-schema';
|
||||
|
||||
export const ConfigSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
});
|
||||
|
||||
export type ConfigType = TypeOf<typeof ConfigSchema>;
|
|
@ -5,17 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { PluginInitializerContext, PluginConfigDescriptor } from '../../../../src/core/server';
|
||||
import { PluginInitializerContext } from '../../../../src/core/server';
|
||||
import { TimelinesPlugin } from './plugin';
|
||||
import { ConfigSchema, ConfigType } from './config';
|
||||
|
||||
export const config: PluginConfigDescriptor<ConfigType> = {
|
||||
deprecations: ({ deprecate }) => [deprecate('enabled', '8.0.0')],
|
||||
schema: ConfigSchema,
|
||||
exposeToBrowser: {
|
||||
enabled: true,
|
||||
},
|
||||
};
|
||||
export function plugin(initializerContext: PluginInitializerContext) {
|
||||
return new TimelinesPlugin(initializerContext);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ const alwaysImportedTests = [
|
|||
require.resolve('../test/functional_embedded/config.ts'),
|
||||
require.resolve('../test/functional_cors/config.ts'),
|
||||
require.resolve('../test/functional_enterprise_search/without_host_configured.config.ts'),
|
||||
require.resolve('../test/functional_vis_wizard/config.ts'),
|
||||
require.resolve('../test/saved_object_tagging/functional/config.ts'),
|
||||
require.resolve('../test/usage_collection/config.ts'),
|
||||
require.resolve('../test/fleet_functional/config.ts'),
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager", "encryptedSavedObjects"],
|
||||
"optionalPlugins": ["spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["actions", "features", "encryptedSavedObjects"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager", "features", "actions", "alerting", "encryptedSavedObjects"],
|
||||
"optionalPlugins": ["security", "spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager", "features", "actions", "alerting"],
|
||||
"optionalPlugins": ["spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -28,7 +28,6 @@ export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProvi
|
|||
'--map.proxyElasticMapsServiceInMaps=true',
|
||||
'--xpack.security.session.idleTimeout=3600000', // 1 hour
|
||||
'--telemetry.optIn=true',
|
||||
'--xpack.fleet.enabled=true',
|
||||
'--xpack.fleet.agents.pollingRequestTimeout=5000', // 5 seconds
|
||||
'--xpack.data_enhanced.search.sessions.enabled=true', // enable WIP send to background UI
|
||||
'--xpack.data_enhanced.search.sessions.notTouchedTimeout=15s', // shorten notTouchedTimeout for quicker testing
|
||||
|
|
|
@ -93,8 +93,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
|
|||
.isDirectory()
|
||||
);
|
||||
|
||||
const casesConfig = ['--xpack.cases.enabled=true'];
|
||||
|
||||
return {
|
||||
testFiles: testFiles ? testFiles : [require.resolve('../tests/common')],
|
||||
servers,
|
||||
|
@ -117,7 +115,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
|
|||
...xPackApiIntegrationTestsConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...xPackApiIntegrationTestsConfig.get('kbnTestServer.serverArgs'),
|
||||
...casesConfig,
|
||||
`--xpack.actions.allowedHosts=${JSON.stringify(['localhost', 'some.non.existent.com'])}`,
|
||||
`--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`,
|
||||
'--xpack.eventLog.logEntries=true',
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["features", "cases"],
|
||||
"optionalPlugins": ["security", "spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["features", "cases"],
|
||||
"optionalPlugins": ["security", "spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["features", "cases"],
|
||||
"optionalPlugins": ["security", "spaces"],
|
||||
"server": true,
|
||||
|
|
|
@ -9,7 +9,6 @@ import { createTestConfig } from '../common/config';
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default createTestConfig('basic', {
|
||||
disabledPlugins: [],
|
||||
license: 'basic',
|
||||
ssl: true,
|
||||
});
|
||||
|
|
|
@ -11,7 +11,6 @@ import { services } from './services';
|
|||
|
||||
interface CreateTestConfigOptions {
|
||||
license: string;
|
||||
disabledPlugins?: string[];
|
||||
ssl?: boolean;
|
||||
}
|
||||
|
||||
|
@ -33,7 +32,7 @@ const enabledActionTypes = [
|
|||
];
|
||||
|
||||
export function createTestConfig(name: string, options: CreateTestConfigOptions) {
|
||||
const { license = 'trial', disabledPlugins = [], ssl = false } = options;
|
||||
const { license = 'trial', ssl = false } = options;
|
||||
|
||||
return async ({ readConfigFile }: FtrConfigProviderContext) => {
|
||||
const xPackApiIntegrationTestsConfig = await readConfigFile(
|
||||
|
@ -58,10 +57,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
|
|||
...xPackApiIntegrationTestsConfig.get('esTestCluster'),
|
||||
license,
|
||||
ssl,
|
||||
serverArgs: [
|
||||
`xpack.license.self_generated.type=${license}`,
|
||||
`xpack.security.enabled=${!disabledPlugins.includes('security')}`,
|
||||
],
|
||||
serverArgs: [`xpack.license.self_generated.type=${license}`],
|
||||
},
|
||||
kbnTestServer: {
|
||||
...xPackApiIntegrationTestsConfig.get('kbnTestServer'),
|
||||
|
@ -74,7 +70,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
|
|||
'testing_ignored.constant',
|
||||
'/testing_regex*/',
|
||||
])}`, // See tests within the file "ignore_fields.ts" which use these values in "alertIgnoreFields"
|
||||
...disabledPlugins.map((key) => `--xpack.${key}.enabled=false`),
|
||||
...(ssl
|
||||
? [
|
||||
`--elasticsearch.hosts=${servers.elasticsearch.protocol}://${servers.elasticsearch.hostname}:${servers.elasticsearch.port}`,
|
||||
|
|
|
@ -9,7 +9,6 @@ import { createTestConfig } from '../common/config';
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default createTestConfig('security_and_spaces', {
|
||||
disabledPlugins: [],
|
||||
license: 'trial',
|
||||
ssl: true,
|
||||
});
|
||||
|
|
|
@ -29,10 +29,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
},
|
||||
kbnTestServer: {
|
||||
...xpackFunctionalConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'),
|
||||
'--xpack.fleet.enabled=true',
|
||||
],
|
||||
serverArgs: [...xpackFunctionalConfig.get('kbnTestServer.serverArgs')],
|
||||
},
|
||||
layout: {
|
||||
fixedHeaderHeight: 200,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["features", "alerting"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('Visualization Wizard', function () {
|
||||
this.tags('ciGroup4');
|
||||
|
||||
loadTestFile(require.resolve('./visualization_wizard'));
|
||||
});
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const PageObjects = getPageObjects(['visualize']);
|
||||
|
||||
describe('lens and maps disabled', function () {
|
||||
before(async function () {
|
||||
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/visualize/default');
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
|
||||
});
|
||||
|
||||
it('should not display lens and maps cards', async function () {
|
||||
await PageObjects.visualize.navigateToNewVisualization();
|
||||
const expectedChartTypes = ['Custom visualization', 'TSVB'];
|
||||
|
||||
// find all the chart types and make sure that maps and lens cards are not there
|
||||
const chartTypes = (await PageObjects.visualize.getPromotedVisTypes()).sort();
|
||||
expect(chartTypes).to.eql(expectedChartTypes);
|
||||
});
|
||||
});
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const xPackFunctionalConfig = await readConfigFile(require.resolve('../functional/config'));
|
||||
|
||||
return {
|
||||
// default to the xpack functional config
|
||||
...xPackFunctionalConfig.getAll(),
|
||||
testFiles: [require.resolve('./apps')],
|
||||
junit: {
|
||||
reportName: 'X-Pack Visualization Wizard Tests with Lens and Maps disabled',
|
||||
},
|
||||
kbnTestServer: {
|
||||
...xPackFunctionalConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...xPackFunctionalConfig.get('kbnTestServer.serverArgs'),
|
||||
'--xpack.lens.enabled=false',
|
||||
'--xpack.maps.enabled=false',
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { GenericFtrProviderContext } from '@kbn/test';
|
||||
import { pageObjects } from '../functional/page_objects';
|
||||
import { services } from '../functional/services';
|
||||
|
||||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;
|
||||
export { pageObjects };
|
|
@ -3,7 +3,6 @@
|
|||
"owner": { "name": "Alerting Services", "githubTeam": "kibana-alerting-services" },
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["alerting", "triggersActionsUi", "features"],
|
||||
"server": true,
|
||||
"ui": true
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["eventLog"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
},
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"owner": { "name": "Alerting Services", "githubTeam": "kibana-alerting-services" },
|
||||
"version": "1.0.0",
|
||||
"kibanaVersion": "kibana",
|
||||
"configPath": ["xpack"],
|
||||
"requiredPlugins": ["taskManager"],
|
||||
"server": true,
|
||||
"ui": false
|
||||
|
|
|
@ -48,7 +48,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
KIBANA_ROOT,
|
||||
'test/plugin_functional/plugins/core_provider_plugin'
|
||||
)}`,
|
||||
'--xpack.timelines.enabled=true',
|
||||
...plugins.map((pluginDir) => `--plugin-path=${resolve(__dirname, 'plugins', pluginDir)}`),
|
||||
],
|
||||
},
|
||||
|
|
|
@ -26,14 +26,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
|
||||
kbnTestServer: {
|
||||
...kibanaCommonTestsConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...kibanaCommonTestsConfig.get('kbnTestServer.serverArgs'),
|
||||
// Enable plugins that are disabled by default to include their metrics
|
||||
// TODO: Find a way to automatically enable all discovered plugins
|
||||
'--xpack.fleet.enabled=true',
|
||||
'--xpack.lists.enabled=true',
|
||||
'--xpack.securitySolution.enabled=true',
|
||||
],
|
||||
serverArgs: [...kibanaCommonTestsConfig.get('kbnTestServer.serverArgs')],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue