From a83eb33726cf124bf98da67eadb7ed0a68158adc Mon Sep 17 00:00:00 2001 From: Tyler Smalley Date: Tue, 20 Oct 2020 15:08:09 -0700 Subject: [PATCH 1/5] skip flaky suite (#81166) --- .../functional/apps/monitoring/elasticsearch/node_detail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/monitoring/elasticsearch/node_detail.js b/x-pack/test/functional/apps/monitoring/elasticsearch/node_detail.js index a58f66214e772..c304b177cb04b 100644 --- a/x-pack/test/functional/apps/monitoring/elasticsearch/node_detail.js +++ b/x-pack/test/functional/apps/monitoring/elasticsearch/node_detail.js @@ -13,7 +13,8 @@ export default function ({ getService, getPageObjects }) { const nodesList = getService('monitoringElasticsearchNodes'); const nodeDetail = getService('monitoringElasticsearchNodeDetail'); - describe('Elasticsearch node detail', () => { + // Failing: See https://github.com/elastic/kibana/issues/81166 + describe.skip('Elasticsearch node detail', () => { describe('Active Nodes', () => { const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects); From 55ae05859ef8d7fd826d823574c796e0e1f186e3 Mon Sep 17 00:00:00 2001 From: Andrew Cholakian Date: Tue, 20 Oct 2020 17:48:30 -0500 Subject: [PATCH 2/5] Update E2E readme with accurate instructions (#81243) * Update E2E readme with accurate instructions * Fix whitespace --- x-pack/plugins/apm/e2e/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/apm/e2e/README.md b/x-pack/plugins/apm/e2e/README.md index cf29b14d19541..3517c74e950c7 100644 --- a/x-pack/plugins/apm/e2e/README.md +++ b/x-pack/plugins/apm/e2e/README.md @@ -2,8 +2,14 @@ **Run E2E tests** + ```sh +# In one terminal +node ./scripts/kibana --no-base-path --dev --no-dev-config --config x-pack/plugins/apm/e2e/ci/kibana.e2e.yml +# In another terminal x-pack/plugins/apm/e2e/run-e2e.sh ``` -_Starts APM Server, Elasticsearch (with sample data) and runs the tests_ +Starts kibana, APM Server, Elasticsearch (with sample data) and runs the tests. + +If you see errors about not all events being ingested correctly try running `cd kibana/x-pack/plugins/apm/e2e/tmp/apm-integration-testing && docker-compose down -v` From 3f98cf7c5ec77854afa83677d189124328b1ab06 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Tue, 20 Oct 2020 17:11:51 -0600 Subject: [PATCH 3/5] [Maps] fix top-level Map page is called 'Kibana' (#81238) --- .../maps/public/routing/routes/list/maps_list_view.tsx | 4 +++- .../maps/public/routing/routes/maps_app/get_breadcrumbs.tsx | 5 ++--- x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx b/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx index d66a0d1b7d0da..3b0891a4fd44d 100644 --- a/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx +++ b/x-pack/plugins/maps/public/routing/routes/list/maps_list_view.tsx @@ -42,6 +42,7 @@ import { getNavigateToApp, } from '../../../kibana_services'; import { getMapsSavedObjectLoader } from '../../bootstrap/services/gis_map_saved_object_loader'; +import { getAppTitle } from '../../../../common/i18n_getters'; export const EMPTY_FILTER = ''; @@ -101,7 +102,8 @@ export class MapsListView extends React.Component { async initMapList() { this.fetchItems(); addHelpMenuToAppChrome(); - getCoreChrome().docTitle.change('Maps'); + getCoreChrome().docTitle.change(getAppTitle()); + getCoreChrome().setBreadcrumbs([{ text: getAppTitle() }]); } _find = (search: string) => getMapsSavedObjectLoader().find(search, this.state.listingLimit); diff --git a/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx b/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx index 149c04b414c18..1f74b0d6d1449 100644 --- a/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx +++ b/x-pack/plugins/maps/public/routing/routes/maps_app/get_breadcrumbs.tsx @@ -7,6 +7,7 @@ import { i18n } from '@kbn/i18n'; import { getNavigateToApp } from '../../../kibana_services'; import { goToSpecifiedPath } from '../../maps_router'; +import { getAppTitle } from '../../../../common/i18n_getters'; export const unsavedChangesWarning = i18n.translate( 'xpack.maps.breadCrumbs.unsavedChangesWarning', @@ -37,9 +38,7 @@ export function getBreadcrumbs({ } breadcrumbs.push({ - text: i18n.translate('xpack.maps.mapController.mapsBreadcrumbLabel', { - defaultMessage: 'Maps', - }), + text: getAppTitle(), onClick: () => { if (getHasUnsavedChanges()) { const navigateAway = window.confirm(unsavedChangesWarning); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 56acbd513a6f6..4277865ec6011 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -11358,7 +11358,6 @@ "xpack.maps.layerWizardSelect.solutionsCategoryLabel": "ソリューション", "xpack.maps.loadMap.errorAttemptingToLoadSavedMap": "マップを読み込めません", "xpack.maps.map.initializeErrorTitle": "マップを初期化できません", - "xpack.maps.mapController.mapsBreadcrumbLabel": "マップ", "xpack.maps.mapEmbeddableFactory.invalidLayerList": "不正な形式のレイヤーリストによりマップを読み込めません", "xpack.maps.mapEmbeddableFactory.invalidSavedObject": "不正な形式の保存済みオブジェクトによりマップを読み込めません", "xpack.maps.mapListing.advancedSettingsLinkText": "高度な設定", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 0ba6f55133b7c..8b9591530aac0 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -11371,7 +11371,6 @@ "xpack.maps.layerWizardSelect.solutionsCategoryLabel": "解决方案", "xpack.maps.loadMap.errorAttemptingToLoadSavedMap": "无法加载地图", "xpack.maps.map.initializeErrorTitle": "无法初始化地图", - "xpack.maps.mapController.mapsBreadcrumbLabel": "Maps", "xpack.maps.mapEmbeddableFactory.invalidLayerList": "无法加载地图,图层列表格式不正确", "xpack.maps.mapEmbeddableFactory.invalidSavedObject": "无法加载地图,已保存对象格式错误", "xpack.maps.mapListing.advancedSettingsLinkText": "高级设置", From d2fa8ac17953f714674f8c954f40c5fe3cf499d8 Mon Sep 17 00:00:00 2001 From: Tyler Smalley Date: Tue, 20 Oct 2020 16:25:04 -0700 Subject: [PATCH 4/5] skip flaky suite (#81264) --- .../basic/tests/correlations/slow_durations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/apm_api_integration/basic/tests/correlations/slow_durations.ts b/x-pack/test/apm_api_integration/basic/tests/correlations/slow_durations.ts index 78dca5100dece..ada67bbec070b 100644 --- a/x-pack/test/apm_api_integration/basic/tests/correlations/slow_durations.ts +++ b/x-pack/test/apm_api_integration/basic/tests/correlations/slow_durations.ts @@ -24,7 +24,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { const fieldNames = 'user.username,user.id,host.ip,user_agent.name,kubernetes.pod.uuid,url.domain,container.id,service.node.name'; - describe('Slow durations', () => { + // Failing: See https://github.com/elastic/kibana/issues/81264 + describe.skip('Slow durations', () => { const url = format({ pathname: `/api/apm/correlations/slow_durations`, query: { start, end, durationPercentile, fieldNames }, From 858fa47f8b0bdf8bfc023bc36975df20d06ff9de Mon Sep 17 00:00:00 2001 From: Yara Tercero Date: Tue, 20 Oct 2020 20:13:35 -0400 Subject: [PATCH 5/5] [SecuritySolution][Unit Tests] - fix flakey unit test (#81239) ### Summary Fixes flakey unit test that was using dateMath as opposed to a fixed date for consistent testing. --- .../public/common/hooks/eql/helpers.test.ts | 73 +++++++++---------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts index 52804c0b17e75..6ba2eaa3d3c30 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import dateMath from '@elastic/datemath'; import moment from 'moment'; import { EqlSearchStrategyResponse } from '../../../../../data_enhanced/common'; @@ -24,37 +23,37 @@ import { getMockEqlResponse, getMockEqlSequenceResponse } from './eql_search_res describe('eql/helpers', () => { describe('calculateBucketForHour', () => { - test('returns 2 if event occurred within 2 minutes of "now"', () => { + test('returns 2 if the difference in times is 2 minutes', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now-1m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:56:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(2); }); - test('returns 10 if event occurred within 8-10 minutes of "now"', () => { + test('returns 10 if the difference in times is 8-10 minutes', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now-9m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:48:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(10); }); - test('returns 16 if event occurred within 10-15 minutes of "now"', () => { + test('returns 16 if the difference in times is 10-15 minutes', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now-15m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:42:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(16); }); - test('returns 60 if event occurred within 58-60 minutes of "now"', () => { + test('returns 60 if the difference in times is 58-60 minutes', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now-59m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T04:58:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(60); @@ -62,8 +61,8 @@ describe('eql/helpers', () => { test('returns exact time difference if it is a multiple of 2', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now-20m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:37:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(20); @@ -71,17 +70,17 @@ describe('eql/helpers', () => { test('returns 0 if times are equal', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:57:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(0); }); - test('returns 2 if event occurred within 2 minutes of "now" but arguments are flipped', () => { + test('returns 2 if the difference in times is 2 minutes but arguments are flipped', () => { const diff = calculateBucketForHour( - Number(dateMath.parse('now')?.format('x')), - Number(dateMath.parse('now-1m')?.format('x')) + Date.parse('2020-02-20T05:57:54.037Z'), + Date.parse('2020-02-20T05:56:54.037Z') ); expect(diff).toEqual(2); @@ -91,53 +90,53 @@ describe('eql/helpers', () => { describe('calculateBucketForDay', () => { test('returns 0 if two dates are equivalent', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:57:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(0); }); - test('returns 1 if event occurred within 60 minutes of "now"', () => { + test('returns 1 if the difference in times is 60 minutes', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now-40m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T05:17:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(1); }); - test('returns 2 if event occurred 60-120 minutes from "now"', () => { + test('returns 2 if the difference in times is 60-120 minutes', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now-120m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T03:57:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(2); }); - test('returns 3 if event occurred 120-180 minutes from "now', () => { + test('returns 3 if the difference in times is 120-180 minutes', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now-121m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T03:56:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(3); }); - test('returns 4 if event occurred 180-240 minutes from "now', () => { + test('returns 4 if the difference in times is 180-240 minutes', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now-220m')?.format('x')), - Number(dateMath.parse('now')?.format('x')) + Date.parse('2020-02-20T02:15:54.037Z'), + Date.parse('2020-02-20T05:57:54.037Z') ); expect(diff).toEqual(4); }); - test('returns 2 if event occurred 60-120 minutes of "now" but arguments are flipped', () => { + test('returns 2 if the difference in times is 60-120 minutes but arguments are flipped', () => { const diff = calculateBucketForDay( - Number(dateMath.parse('now')?.format('x')), - Number(dateMath.parse('now-118m')?.format('x')) + Date.parse('2020-02-20T05:57:54.037Z'), + Date.parse('2020-02-20T03:59:54.037Z') ); expect(diff).toEqual(2);