Skip to content

Commit 9b24ee3

Browse files
authored
Merge branch '7.x' into ua/hide_migrated_indices_from_flyout
2 parents 5604ee1 + 6e64940 commit 9b24ee3

311 files changed

Lines changed: 5131 additions & 2535 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/core/public/chrome/ui/header/collapsible_nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export function CollapsibleNav({
362362
iconType="plusInCircleFilled"
363363
>
364364
{i18n.translate('core.ui.primaryNav.addData', {
365-
defaultMessage: 'Add data',
365+
defaultMessage: 'Add integrations',
366366
})}
367367
</EuiButton>
368368
</EuiCollapsibleNavGroup>

src/core/server/config/deprecation/core_deprecations.ts

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const kibanaPathConf: ConfigDeprecation = (settings, fromPath, addDeprecation) =
1313
if (process.env?.KIBANA_PATH_CONF) {
1414
addDeprecation({
1515
configPath: 'env.KIBANA_PATH_CONF',
16+
level: 'critical',
1617
message: `Environment variable "KIBANA_PATH_CONF" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`,
1718
correctiveActions: {
1819
manualSteps: [
@@ -27,6 +28,7 @@ const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDepreca
2728
if (process.env?.CONFIG_PATH) {
2829
addDeprecation({
2930
configPath: 'env.CONFIG_PATH',
31+
level: 'critical',
3032
message: `Environment variable "CONFIG_PATH" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`,
3133
correctiveActions: {
3234
manualSteps: ['Use "KBN_PATH_CONF" instead of "CONFIG_PATH" to point to a config folder.'],
@@ -39,6 +41,7 @@ const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
3941
if (process.env?.DATA_PATH) {
4042
addDeprecation({
4143
configPath: 'env.DATA_PATH',
44+
level: 'critical',
4245
message: `Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`,
4346
correctiveActions: {
4447
manualSteps: [
@@ -53,13 +56,13 @@ const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDe
5356
if (settings.server?.basePath && !settings.server?.rewriteBasePath) {
5457
addDeprecation({
5558
configPath: 'server.basePath',
59+
level: 'warning',
5660
title: 'Setting "server.rewriteBasePath" should be set when using "server.basePath"',
5761
message:
5862
'You should set server.basePath along with server.rewriteBasePath. Starting in 7.0, Kibana ' +
5963
'will expect that all requests start with server.basePath rather than expecting you to rewrite ' +
6064
'the requests in your reverse proxy. Set server.rewriteBasePath to false to preserve the ' +
6165
'current behavior and silence this warning.',
62-
level: 'warning',
6366
correctiveActions: {
6467
manualSteps: [
6568
`Set 'server.rewriteBasePath' in the config file, CLI flag, or environment variable (in Docker only).`,
@@ -75,6 +78,7 @@ const rewriteCorsSettings: ConfigDeprecation = (settings, fromPath, addDeprecati
7578
if (typeof corsSettings === 'boolean') {
7679
addDeprecation({
7780
configPath: 'server.cors',
81+
level: 'warning',
7882
title: 'Setting "server.cors" is deprecated',
7983
message: '"server.cors" is deprecated and has been replaced by "server.cors.enabled"',
8084
correctiveActions: {
@@ -113,6 +117,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
113117
if (sourceList.find((source) => source.includes(NONCE_STRING))) {
114118
addDeprecation({
115119
configPath: 'csp.rules',
120+
level: 'critical',
116121
message: `csp.rules no longer supports the {nonce} syntax. Replacing with 'self' in ${policy}`,
117122
correctiveActions: {
118123
manualSteps: [`Replace {nonce} syntax with 'self' in ${policy}`],
@@ -132,6 +137,7 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
132137
) {
133138
addDeprecation({
134139
configPath: 'csp.rules',
140+
level: 'critical',
135141
message: `csp.rules must contain the 'self' source. Automatically adding to ${policy}.`,
136142
correctiveActions: {
137143
manualSteps: [`Add 'self' source to ${policy}.`],
@@ -156,6 +162,7 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = (
156162
if (settings.map?.manifestServiceUrl) {
157163
addDeprecation({
158164
configPath: 'map.manifestServiceUrl',
165+
level: 'critical',
159166
message:
160167
'You should no longer use the map.manifestServiceUrl setting in kibana.yml to configure the location ' +
161168
'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' +
@@ -175,6 +182,7 @@ const serverHostZeroDeprecation: ConfigDeprecation = (settings, fromPath, addDep
175182
if (settings.server?.host === '0') {
176183
addDeprecation({
177184
configPath: 'server.host',
185+
level: 'critical',
178186
message:
179187
'Support for setting server.host to "0" in kibana.yml is deprecated and will be removed in Kibana version 8.0.0. ' +
180188
'Instead use "0.0.0.0" to bind to all interfaces.',
@@ -206,6 +214,7 @@ const opsLoggingEventDeprecation: ConfigDeprecation = (
206214
if (settings.logging?.events?.ops) {
207215
addDeprecation({
208216
configPath: 'logging.events.ops',
217+
level: 'critical',
209218
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
210219
title: i18n.translate('core.deprecations.loggingEventsOps.deprecationTitle', {
211220
defaultMessage: `Setting "logging.events.ops" is deprecated`,
@@ -237,6 +246,7 @@ const requestLoggingEventDeprecation: ConfigDeprecation = (
237246
if (settings.logging?.events?.request) {
238247
addDeprecation({
239248
configPath: 'logging.events.request',
249+
level: 'critical',
240250
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
241251
title: i18n.translate('core.deprecations.loggingEventsRequest.deprecationTitle', {
242252
defaultMessage: `Setting "logging.events.request" is deprecated`,
@@ -268,6 +278,7 @@ const responseLoggingEventDeprecation: ConfigDeprecation = (
268278
if (settings.logging?.events?.response) {
269279
addDeprecation({
270280
configPath: 'logging.events.response',
281+
level: 'critical',
271282
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
272283
title: i18n.translate('core.deprecations.loggingEventsResponse.deprecationTitle', {
273284
defaultMessage: `Setting "logging.events.response" is deprecated`,
@@ -299,6 +310,7 @@ const timezoneLoggingDeprecation: ConfigDeprecation = (
299310
if (settings.logging?.timezone) {
300311
addDeprecation({
301312
configPath: 'logging.timezone',
313+
level: 'critical',
302314
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingtimezone`,
303315
title: i18n.translate('core.deprecations.loggingTimezone.deprecationTitle', {
304316
defaultMessage: `Setting "logging.timezone" is deprecated`,
@@ -330,6 +342,7 @@ const destLoggingDeprecation: ConfigDeprecation = (
330342
if (settings.logging?.dest) {
331343
addDeprecation({
332344
configPath: 'logging.dest',
345+
level: 'critical',
333346
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingdest`,
334347
title: i18n.translate('core.deprecations.loggingDest.deprecationTitle', {
335348
defaultMessage: `Setting "logging.dest" is deprecated`,
@@ -361,6 +374,7 @@ const quietLoggingDeprecation: ConfigDeprecation = (
361374
if (settings.logging?.quiet) {
362375
addDeprecation({
363376
configPath: 'logging.quiet',
377+
level: 'critical',
364378
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingquiet`,
365379
title: i18n.translate('core.deprecations.loggingQuiet.deprecationTitle', {
366380
defaultMessage: `Setting "logging.quiet" is deprecated`,
@@ -391,6 +405,7 @@ const silentLoggingDeprecation: ConfigDeprecation = (
391405
if (settings.logging?.silent) {
392406
addDeprecation({
393407
configPath: 'logging.silent',
408+
level: 'critical',
394409
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingsilent`,
395410
title: i18n.translate('core.deprecations.loggingSilent.deprecationTitle', {
396411
defaultMessage: `Setting "logging.silent" is deprecated`,
@@ -421,6 +436,7 @@ const verboseLoggingDeprecation: ConfigDeprecation = (
421436
if (settings.logging?.verbose) {
422437
addDeprecation({
423438
configPath: 'logging.verbose',
439+
level: 'critical',
424440
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingverbose`,
425441
title: i18n.translate('core.deprecations.loggingVerbose.deprecationTitle', {
426442
defaultMessage: `Setting "logging.verbose" is deprecated`,
@@ -455,6 +471,7 @@ const jsonLoggingDeprecation: ConfigDeprecation = (
455471
if (settings.logging?.json && settings.env !== 'development') {
456472
addDeprecation({
457473
configPath: 'logging.json',
474+
level: 'critical',
458475
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
459476
title: i18n.translate('core.deprecations.loggingJson.deprecationTitle', {
460477
defaultMessage: `Setting "logging.json" is deprecated`,
@@ -487,6 +504,7 @@ const logRotateDeprecation: ConfigDeprecation = (
487504
if (settings.logging?.rotate) {
488505
addDeprecation({
489506
configPath: 'logging.rotate',
507+
level: 'critical',
490508
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#rolling-file-appender`,
491509
title: i18n.translate('core.deprecations.loggingRotate.deprecationTitle', {
492510
defaultMessage: `Setting "logging.rotate" is deprecated`,
@@ -518,6 +536,7 @@ const logEventsLogDeprecation: ConfigDeprecation = (
518536
if (settings.logging?.events?.log) {
519537
addDeprecation({
520538
configPath: 'logging.events.log',
539+
level: 'critical',
521540
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
522541
title: i18n.translate('core.deprecations.loggingEventsLog.deprecationTitle', {
523542
defaultMessage: `Setting "logging.events.log" is deprecated`,
@@ -548,6 +567,7 @@ const logEventsErrorDeprecation: ConfigDeprecation = (
548567
if (settings.logging?.events?.error) {
549568
addDeprecation({
550569
configPath: 'logging.events.error',
570+
level: 'critical',
551571
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingevents`,
552572
title: i18n.translate('core.deprecations.loggingEventsError.deprecationTitle', {
553573
defaultMessage: `Setting "logging.events.error" is deprecated`,
@@ -578,6 +598,7 @@ const logFilterDeprecation: ConfigDeprecation = (
578598
if (settings.logging?.filter) {
579599
addDeprecation({
580600
configPath: 'logging.filter',
601+
level: 'critical',
581602
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#loggingfilter`,
582603
title: i18n.translate('core.deprecations.loggingFilter.deprecationTitle', {
583604
defaultMessage: `Setting "logging.filter" is deprecated`,
@@ -596,40 +617,42 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
596617
unusedFromRoot,
597618
renameFromRoot,
598619
}) => [
599-
unusedFromRoot('savedObjects.indexCheckTimeout'),
600-
unusedFromRoot('server.xsrf.token'),
601-
unusedFromRoot('maps.manifestServiceUrl'),
602-
unusedFromRoot('optimize.lazy'),
603-
unusedFromRoot('optimize.lazyPort'),
604-
unusedFromRoot('optimize.lazyHost'),
605-
unusedFromRoot('optimize.lazyPrebuild'),
606-
unusedFromRoot('optimize.lazyProxyTimeout'),
607-
unusedFromRoot('optimize.enabled'),
608-
unusedFromRoot('optimize.bundleFilter'),
609-
unusedFromRoot('optimize.bundleDir'),
610-
unusedFromRoot('optimize.viewCaching'),
611-
unusedFromRoot('optimize.watch'),
612-
unusedFromRoot('optimize.watchPort'),
613-
unusedFromRoot('optimize.watchHost'),
614-
unusedFromRoot('optimize.watchPrebuild'),
615-
unusedFromRoot('optimize.watchProxyTimeout'),
616-
unusedFromRoot('optimize.useBundleCache'),
617-
unusedFromRoot('optimize.sourceMaps'),
618-
unusedFromRoot('optimize.workers'),
619-
unusedFromRoot('optimize.profile'),
620-
unusedFromRoot('optimize.validateSyntaxOfNodeModules'),
621-
renameFromRoot('xpack.xpack_main.telemetry.config', 'telemetry.config'),
622-
renameFromRoot('xpack.xpack_main.telemetry.url', 'telemetry.url'),
623-
renameFromRoot('xpack.xpack_main.telemetry.enabled', 'telemetry.enabled'),
624-
renameFromRoot('xpack.telemetry.enabled', 'telemetry.enabled'),
625-
renameFromRoot('xpack.telemetry.config', 'telemetry.config'),
626-
renameFromRoot('xpack.telemetry.banner', 'telemetry.banner'),
627-
renameFromRoot('xpack.telemetry.url', 'telemetry.url'),
628-
renameFromRoot('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath'),
629-
renameFromRoot('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath'),
630-
renameFromRoot('server.xsrf.whitelist', 'server.xsrf.allowlist'),
631-
unusedFromRoot('elasticsearch.preserveHost'),
632-
unusedFromRoot('elasticsearch.startupTimeout'),
620+
unusedFromRoot('savedObjects.indexCheckTimeout', { level: 'critical' }),
621+
unusedFromRoot('server.xsrf.token', { level: 'critical' }),
622+
unusedFromRoot('maps.manifestServiceUrl', { level: 'critical' }),
623+
unusedFromRoot('optimize.lazy', { level: 'critical' }),
624+
unusedFromRoot('optimize.lazyPort', { level: 'critical' }),
625+
unusedFromRoot('optimize.lazyHost', { level: 'critical' }),
626+
unusedFromRoot('optimize.lazyPrebuild', { level: 'critical' }),
627+
unusedFromRoot('optimize.lazyProxyTimeout', { level: 'critical' }),
628+
unusedFromRoot('optimize.enabled', { level: 'critical' }),
629+
unusedFromRoot('optimize.bundleFilter', { level: 'critical' }),
630+
unusedFromRoot('optimize.bundleDir', { level: 'critical' }),
631+
unusedFromRoot('optimize.viewCaching', { level: 'critical' }),
632+
unusedFromRoot('optimize.watch', { level: 'critical' }),
633+
unusedFromRoot('optimize.watchPort', { level: 'critical' }),
634+
unusedFromRoot('optimize.watchHost', { level: 'critical' }),
635+
unusedFromRoot('optimize.watchPrebuild', { level: 'critical' }),
636+
unusedFromRoot('optimize.watchProxyTimeout', { level: 'critical' }),
637+
unusedFromRoot('optimize.useBundleCache', { level: 'critical' }),
638+
unusedFromRoot('optimize.sourceMaps', { level: 'critical' }),
639+
unusedFromRoot('optimize.workers', { level: 'critical' }),
640+
unusedFromRoot('optimize.profile', { level: 'critical' }),
641+
unusedFromRoot('optimize.validateSyntaxOfNodeModules', { level: 'critical' }),
642+
renameFromRoot('xpack.xpack_main.telemetry.config', 'telemetry.config', { level: 'critical' }),
643+
renameFromRoot('xpack.xpack_main.telemetry.url', 'telemetry.url', { level: 'critical' }),
644+
renameFromRoot('xpack.xpack_main.telemetry.enabled', 'telemetry.enabled', { level: 'critical' }),
645+
renameFromRoot('xpack.telemetry.enabled', 'telemetry.enabled', { level: 'critical' }),
646+
renameFromRoot('xpack.telemetry.config', 'telemetry.config', { level: 'critical' }),
647+
renameFromRoot('xpack.telemetry.banner', 'telemetry.banner', { level: 'critical' }),
648+
renameFromRoot('xpack.telemetry.url', 'telemetry.url', { level: 'critical' }),
649+
renameFromRoot('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath', { level: 'critical' }),
650+
renameFromRoot('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath', {
651+
level: 'critical',
652+
}),
653+
renameFromRoot('server.xsrf.whitelist', 'server.xsrf.allowlist', { level: 'critical' }),
654+
unusedFromRoot('elasticsearch.preserveHost', { level: 'critical' }),
655+
unusedFromRoot('elasticsearch.startupTimeout', { level: 'critical' }),
633656
rewriteCorsSettings,
634657
configPathDeprecation,
635658
kibanaPathConf,

src/core/server/kibana_config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const deprecations: ConfigDeprecationProvider = () => [
1818
if (kibana?.index) {
1919
addDeprecation({
2020
configPath: 'kibana.index',
21+
level: 'critical',
2122
title: i18n.translate('core.kibana.index.deprecationTitle', {
2223
defaultMessage: `Setting "kibana.index" is deprecated`,
2324
}),

src/plugins/data/common/search/aggs/metrics/single_percentile.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ describe('AggTypeMetricSinglePercentileProvider class', () => {
7373
).toEqual(123);
7474
});
7575

76+
it('should not throw error for empty buckets', () => {
77+
const agg = aggConfigs.getResponseAggs()[0];
78+
expect(agg.getValue({})).toEqual(NaN);
79+
});
80+
7681
it('produces the expected expression ast', () => {
7782
const agg = aggConfigs.getResponseAggs()[0];
7883
expect(agg.toExpressionAst()).toMatchInlineSnapshot(`

src/plugins/data/common/search/aggs/metrics/single_percentile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ export const getSinglePercentileMetricAgg = () => {
5757
if (Number.isInteger(agg.params.percentile)) {
5858
valueKey += '.0';
5959
}
60-
return bucket[agg.id].values[valueKey];
60+
const { values } = bucket[agg.id] ?? {};
61+
62+
return values ? values[valueKey] : NaN;
6163
},
6264
});
6365
};

src/plugins/data/common/search/tabify/tabify_docs.test.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ function create(id: string) {
4141
});
4242
}
4343

44+
const meta = {
45+
_index: 'index-name',
46+
_id: '1',
47+
};
48+
4449
describe('tabify_docs', () => {
4550
describe('flattenHit', () => {
4651
let indexPattern: DataView;
@@ -70,6 +75,50 @@ describe('tabify_docs', () => {
7075
expect(Object.keys(response)).toEqual(expectedOrder);
7176
expect(Object.entries(response).map(([key]) => key)).toEqual(expectedOrder);
7277
});
78+
79+
it('does merge values from ignored_field_values and fields correctly', () => {
80+
const flatten = flattenHit(
81+
{
82+
...meta,
83+
fields: { 'extension.keyword': ['foo'], extension: ['foo', 'ignored'] },
84+
ignored_field_values: {
85+
'extension.keyword': ['ignored'],
86+
fully_ignored: ['some', 'value'],
87+
},
88+
},
89+
indexPattern,
90+
{ includeIgnoredValues: true }
91+
);
92+
expect(flatten).toHaveProperty(['extension.keyword'], ['foo', 'ignored']);
93+
expect(flatten).toHaveProperty('extension', ['foo', 'ignored']);
94+
expect(flatten).toHaveProperty('fully_ignored', ['some', 'value']);
95+
});
96+
97+
it('does not merge values from ignored_field_values into _source', () => {
98+
const flatten = flattenHit(
99+
{
100+
...meta,
101+
_source: { 'extension.keyword': ['foo', 'ignored'] },
102+
ignored_field_values: { 'extension.keyword': ['ignored'] },
103+
},
104+
indexPattern,
105+
{ includeIgnoredValues: true, source: true }
106+
);
107+
expect(flatten).toHaveProperty(['extension.keyword'], ['foo', 'ignored']);
108+
});
109+
110+
it('does merge ignored_field_values when no _source was present, even when parameter was on', () => {
111+
const flatten = flattenHit(
112+
{
113+
...meta,
114+
fields: { 'extension.keyword': ['foo'] },
115+
ignored_field_values: { 'extension.keyword': ['ignored'] },
116+
},
117+
indexPattern,
118+
{ includeIgnoredValues: true, source: true }
119+
);
120+
expect(flatten).toHaveProperty(['extension.keyword'], ['foo', 'ignored']);
121+
});
73122
});
74123

75124
describe('tabifyDocs', () => {

0 commit comments

Comments
 (0)