From 6707faf3a815bf0888c2f8b29117fca28b1999e9 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 26 Aug 2019 15:31:41 +0200 Subject: [PATCH 1/5] [services/es_archiver] retry uiSettings update --- test/common/services/es_archiver.ts | 1 + test/common/services/kibana_server/extend_es_archiver.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/common/services/es_archiver.ts b/test/common/services/es_archiver.ts index cf8474662306b..e72bb49a76c0d 100644 --- a/test/common/services/es_archiver.ts +++ b/test/common/services/es_archiver.ts @@ -46,6 +46,7 @@ export function EsArchiverProvider({ getService, hasService }: FtrProviderContex KibanaServer.extendEsArchiver({ esArchiver, kibanaServer: getService('kibanaServer'), + retry: getService('retry'), defaults: config.get('uiSettings.defaults'), }); } diff --git a/test/common/services/kibana_server/extend_es_archiver.js b/test/common/services/kibana_server/extend_es_archiver.js index 30ac65b81bc6a..d934e6725a9f5 100644 --- a/test/common/services/kibana_server/extend_es_archiver.js +++ b/test/common/services/kibana_server/extend_es_archiver.js @@ -20,7 +20,7 @@ const ES_ARCHIVER_LOAD_METHODS = ['load', 'loadIfNeeded', 'unload']; const KIBANA_INDEX = '.kibana'; -export function extendEsArchiver({ esArchiver, kibanaServer, defaults }) { +export function extendEsArchiver({ esArchiver, kibanaServer, retry, defaults }) { // only extend the esArchiver if there are default uiSettings to restore if (!defaults) { return; @@ -36,7 +36,9 @@ export function extendEsArchiver({ esArchiver, kibanaServer, defaults }) { // if the kibana index was created by the esArchiver then update the uiSettings // with the defaults to make sure that they are always in place initially if (stats[KIBANA_INDEX] && (stats[KIBANA_INDEX].created || stats[KIBANA_INDEX].deleted)) { - await kibanaServer.uiSettings.update(defaults); + await retry.try(async () => { + await kibanaServer.uiSettings.update(defaults); + }); } return stats; From 80e199c3aa52bbab3ff388f74eaa3146ee69bb15 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 26 Aug 2019 15:47:44 +0200 Subject: [PATCH 2/5] run x-pack-ciGroup7 30x times --- .ci/jobs.yml | 85 +++++++++++++++++++++----------- test/scripts/jenkins_ci_group.sh | 2 +- 2 files changed, 58 insertions(+), 29 deletions(-) diff --git a/.ci/jobs.yml b/.ci/jobs.yml index 89fce3cf488d5..5b3a66a4cbb7f 100644 --- a/.ci/jobs.yml +++ b/.ci/jobs.yml @@ -1,34 +1,63 @@ JOB: - - kibana-intake - - x-pack-intake - - kibana-firefoxSmoke - - kibana-ciGroup1 - - kibana-ciGroup2 - - kibana-ciGroup3 - - kibana-ciGroup4 - - kibana-ciGroup5 - - kibana-ciGroup6 - - kibana-ciGroup7 - - kibana-ciGroup8 - - kibana-ciGroup9 - - kibana-ciGroup10 - - kibana-ciGroup11 - - kibana-ciGroup12 - - kibana-visualRegression + # - kibana-intake + # - x-pack-intake + # - kibana-firefoxSmoke + # - kibana-ciGroup1 + # - kibana-ciGroup2 + # - kibana-ciGroup3 + # - kibana-ciGroup4 + # - kibana-ciGroup5 + # - kibana-ciGroup6 + # - kibana-ciGroup7 + # - kibana-ciGroup8 + # - kibana-ciGroup9 + # - kibana-ciGroup10 + # - kibana-ciGroup11 + # - kibana-ciGroup12 + # - kibana-visualRegression # make sure all x-pack-ciGroups are listed in test/scripts/jenkins_xpack_ci_group.sh - - x-pack-firefoxSmoke - - x-pack-ciGroup1 - - x-pack-ciGroup2 - - x-pack-ciGroup3 - - x-pack-ciGroup4 - - x-pack-ciGroup5 - - x-pack-ciGroup6 - - x-pack-ciGroup7 - - x-pack-ciGroup8 - - x-pack-ciGroup9 - - x-pack-ciGroup10 - - x-pack-visualRegression + # - x-pack-firefoxSmoke + # - x-pack-ciGroup1 + # - x-pack-ciGroup2 + # - x-pack-ciGroup3 + # - x-pack-ciGroup4 + # - x-pack-ciGroup5 + # - x-pack-ciGroup6 + - x-pack-ciGroup7-1 + - x-pack-ciGroup7-2 + - x-pack-ciGroup7-3 + - x-pack-ciGroup7-4 + - x-pack-ciGroup7-5 + - x-pack-ciGroup7-6 + - x-pack-ciGroup7-7 + - x-pack-ciGroup7-8 + - x-pack-ciGroup7-9 + - x-pack-ciGroup7-10 + - x-pack-ciGroup7-11 + - x-pack-ciGroup7-12 + - x-pack-ciGroup7-13 + - x-pack-ciGroup7-14 + - x-pack-ciGroup7-15 + - x-pack-ciGroup7-16 + - x-pack-ciGroup7-17 + - x-pack-ciGroup7-18 + - x-pack-ciGroup7-19 + - x-pack-ciGroup7-20 + - x-pack-ciGroup7-21 + - x-pack-ciGroup7-22 + - x-pack-ciGroup7-23 + - x-pack-ciGroup7-24 + - x-pack-ciGroup7-25 + - x-pack-ciGroup7-26 + - x-pack-ciGroup7-27 + - x-pack-ciGroup7-28 + - x-pack-ciGroup7-29 + - x-pack-ciGroup7-30 + # - x-pack-ciGroup8 + # - x-pack-ciGroup9 + # - x-pack-ciGroup10 + # - x-pack-visualRegression # `~` is yaml for `null` exclude: ~ diff --git a/test/scripts/jenkins_ci_group.sh b/test/scripts/jenkins_ci_group.sh index fb532e9ec71db..65ce56840ee4e 100755 --- a/test/scripts/jenkins_ci_group.sh +++ b/test/scripts/jenkins_ci_group.sh @@ -3,7 +3,7 @@ set -e trap 'node "$KIBANA_DIR/src/dev/failed_tests/cli"' EXIT -yarn run grunt functionalTests:ensureAllTestsInCiGroup; +#yarn run grunt functionalTests:ensureAllTestsInCiGroup; node scripts/build --debug --oss; From 17e7199d2e83d502e77fda5e9c19096905dc580f Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 26 Aug 2019 18:27:49 +0200 Subject: [PATCH 3/5] Revert "run x-pack-ciGroup7 30x times" This reverts commit 80e199c3aa52bbab3ff388f74eaa3146ee69bb15. --- .ci/jobs.yml | 85 +++++++++++--------------------- test/scripts/jenkins_ci_group.sh | 2 +- 2 files changed, 29 insertions(+), 58 deletions(-) diff --git a/.ci/jobs.yml b/.ci/jobs.yml index 5b3a66a4cbb7f..89fce3cf488d5 100644 --- a/.ci/jobs.yml +++ b/.ci/jobs.yml @@ -1,63 +1,34 @@ JOB: - # - kibana-intake - # - x-pack-intake - # - kibana-firefoxSmoke - # - kibana-ciGroup1 - # - kibana-ciGroup2 - # - kibana-ciGroup3 - # - kibana-ciGroup4 - # - kibana-ciGroup5 - # - kibana-ciGroup6 - # - kibana-ciGroup7 - # - kibana-ciGroup8 - # - kibana-ciGroup9 - # - kibana-ciGroup10 - # - kibana-ciGroup11 - # - kibana-ciGroup12 - # - kibana-visualRegression + - kibana-intake + - x-pack-intake + - kibana-firefoxSmoke + - kibana-ciGroup1 + - kibana-ciGroup2 + - kibana-ciGroup3 + - kibana-ciGroup4 + - kibana-ciGroup5 + - kibana-ciGroup6 + - kibana-ciGroup7 + - kibana-ciGroup8 + - kibana-ciGroup9 + - kibana-ciGroup10 + - kibana-ciGroup11 + - kibana-ciGroup12 + - kibana-visualRegression # make sure all x-pack-ciGroups are listed in test/scripts/jenkins_xpack_ci_group.sh - # - x-pack-firefoxSmoke - # - x-pack-ciGroup1 - # - x-pack-ciGroup2 - # - x-pack-ciGroup3 - # - x-pack-ciGroup4 - # - x-pack-ciGroup5 - # - x-pack-ciGroup6 - - x-pack-ciGroup7-1 - - x-pack-ciGroup7-2 - - x-pack-ciGroup7-3 - - x-pack-ciGroup7-4 - - x-pack-ciGroup7-5 - - x-pack-ciGroup7-6 - - x-pack-ciGroup7-7 - - x-pack-ciGroup7-8 - - x-pack-ciGroup7-9 - - x-pack-ciGroup7-10 - - x-pack-ciGroup7-11 - - x-pack-ciGroup7-12 - - x-pack-ciGroup7-13 - - x-pack-ciGroup7-14 - - x-pack-ciGroup7-15 - - x-pack-ciGroup7-16 - - x-pack-ciGroup7-17 - - x-pack-ciGroup7-18 - - x-pack-ciGroup7-19 - - x-pack-ciGroup7-20 - - x-pack-ciGroup7-21 - - x-pack-ciGroup7-22 - - x-pack-ciGroup7-23 - - x-pack-ciGroup7-24 - - x-pack-ciGroup7-25 - - x-pack-ciGroup7-26 - - x-pack-ciGroup7-27 - - x-pack-ciGroup7-28 - - x-pack-ciGroup7-29 - - x-pack-ciGroup7-30 - # - x-pack-ciGroup8 - # - x-pack-ciGroup9 - # - x-pack-ciGroup10 - # - x-pack-visualRegression + - x-pack-firefoxSmoke + - x-pack-ciGroup1 + - x-pack-ciGroup2 + - x-pack-ciGroup3 + - x-pack-ciGroup4 + - x-pack-ciGroup5 + - x-pack-ciGroup6 + - x-pack-ciGroup7 + - x-pack-ciGroup8 + - x-pack-ciGroup9 + - x-pack-ciGroup10 + - x-pack-visualRegression # `~` is yaml for `null` exclude: ~ diff --git a/test/scripts/jenkins_ci_group.sh b/test/scripts/jenkins_ci_group.sh index 65ce56840ee4e..fb532e9ec71db 100755 --- a/test/scripts/jenkins_ci_group.sh +++ b/test/scripts/jenkins_ci_group.sh @@ -3,7 +3,7 @@ set -e trap 'node "$KIBANA_DIR/src/dev/failed_tests/cli"' EXIT -#yarn run grunt functionalTests:ensureAllTestsInCiGroup; +yarn run grunt functionalTests:ensureAllTestsInCiGroup; node scripts/build --debug --oss; From 736f102e01f52afebcaa6154f4073064136aa2f1 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 26 Aug 2019 21:30:34 +0200 Subject: [PATCH 4/5] [saved_object_api_integration/common/services] add retry service to the set --- .../test/saved_object_api_integration/common/services/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test/saved_object_api_integration/common/services/index.ts b/x-pack/test/saved_object_api_integration/common/services/index.ts index 7c201af3ef469..dc2f023c0ba02 100644 --- a/x-pack/test/saved_object_api_integration/common/services/index.ts +++ b/x-pack/test/saved_object_api_integration/common/services/index.ts @@ -16,6 +16,7 @@ export const services = { esSupertestWithoutAuth: apiIntegrationServices.esSupertestWithoutAuth, supertest: kibanaApiIntegrationServices.supertest, supertestWithoutAuth: apiIntegrationServices.supertestWithoutAuth, + retry: kibanaApiIntegrationServices.retry, esArchiver: kibanaFunctionalServices.esArchiver, kibanaServer: kibanaFunctionalServices.kibanaServer, }; From d6af962c99ca78af13d442ecffd3cb4913d05785 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 26 Aug 2019 22:45:13 +0200 Subject: [PATCH 5/5] add retry service for x-pack api tests --- x-pack/test/spaces_api_integration/common/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test/spaces_api_integration/common/config.ts b/x-pack/test/spaces_api_integration/common/config.ts index 4c8cc3a8234ee..daf3b45982a34 100644 --- a/x-pack/test/spaces_api_integration/common/config.ts +++ b/x-pack/test/spaces_api_integration/common/config.ts @@ -38,6 +38,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) esSupertestWithoutAuth: config.xpack.api.get('services.esSupertestWithoutAuth'), supertest: config.kibana.api.get('services.supertest'), supertestWithoutAuth: config.xpack.api.get('services.supertestWithoutAuth'), + retry: config.xpack.api.get('services.retry'), esArchiver: config.kibana.functional.get('services.esArchiver'), kibanaServer: config.kibana.functional.get('services.kibanaServer'), },