From c09bdb2889066d7fd631fd4b26225b56fa0e82fc Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 11:56:56 -0800 Subject: [PATCH 1/6] Add retries to first test in each Cypress suite to counter random timeout failures Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- dashboards-notifications/.cypress/integration/channels.spec.js | 2 +- .../.cypress/integration/email_senders_and_groups.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards-notifications/.cypress/integration/channels.spec.js b/dashboards-notifications/.cypress/integration/channels.spec.js index f0fd65b6..b57de506 100644 --- a/dashboards-notifications/.cypress/integration/channels.spec.js +++ b/dashboards-notifications/.cypress/integration/channels.spec.js @@ -28,7 +28,7 @@ describe('Test create channels', () => { cy.wait(delay * 3); }); - it('creates a slack channel and send test message', () => { + it('creates a slack channel and send test message', { retries: 3 }, () => { cy.get('[data-test-subj="create-channel-create-button"]').click(); cy.contains('Some fields are invalid.').should('exist'); diff --git a/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js b/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js index 76155d93..84331ffc 100644 --- a/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js +++ b/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js @@ -27,7 +27,7 @@ describe('Test create email senders', () => { cy.wait(delay * 5); }); - it('creates ssl sender', () => { + it('creates ssl sender', { retries: 3 }, () => { cy.get('.euiButton__text') .contains('Create SMTP sender') .click({ force: true }); From 05f379a7b76f0d289418e1d06966df9b4d76903f Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:38:06 -0800 Subject: [PATCH 2/6] Update dashboard version in CI to 2.4.0 until branch is updated to newer version Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- .../dashboards-notifications-test-and-build-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml index c28aea67..10e1da85 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml @@ -9,7 +9,7 @@ on: [pull_request, push] env: PLUGIN_NAME: notifications-dashboards - OPENSEARCH_DASHBOARDS_VERSION: '2.4' + OPENSEARCH_DASHBOARDS_VERSION: '2.4.0' OPENSEARCH_VERSION: '2.4.0-SNAPSHOT' jobs: From f1f3b84fbbef3ebb63153335c00d01dd2674c262 Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 13:57:59 -0800 Subject: [PATCH 3/6] Move Cypress retry to global config Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- .../.cypress/integration/channels.spec.js | 2 +- .../.cypress/integration/email_senders_and_groups.spec.js | 2 +- dashboards-notifications/cypress.json | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dashboards-notifications/.cypress/integration/channels.spec.js b/dashboards-notifications/.cypress/integration/channels.spec.js index b57de506..f0fd65b6 100644 --- a/dashboards-notifications/.cypress/integration/channels.spec.js +++ b/dashboards-notifications/.cypress/integration/channels.spec.js @@ -28,7 +28,7 @@ describe('Test create channels', () => { cy.wait(delay * 3); }); - it('creates a slack channel and send test message', { retries: 3 }, () => { + it('creates a slack channel and send test message', () => { cy.get('[data-test-subj="create-channel-create-button"]').click(); cy.contains('Some fields are invalid.').should('exist'); diff --git a/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js b/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js index 84331ffc..76155d93 100644 --- a/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js +++ b/dashboards-notifications/.cypress/integration/email_senders_and_groups.spec.js @@ -27,7 +27,7 @@ describe('Test create email senders', () => { cy.wait(delay * 5); }); - it('creates ssl sender', { retries: 3 }, () => { + it('creates ssl sender', () => { cy.get('.euiButton__text') .contains('Create SMTP sender') .click({ force: true }); diff --git a/dashboards-notifications/cypress.json b/dashboards-notifications/cypress.json index 4585c272..f9193d14 100644 --- a/dashboards-notifications/cypress.json +++ b/dashboards-notifications/cypress.json @@ -11,6 +11,10 @@ "requestTimeout": 60000, "responseTimeout": 60000, "defaultCommandTimeout": 60000, + "retries": { + "runMode": 3, + "openMode": 3 + }, "env": { "opensearch": "localhost:9200", "opensearchDashboards": "localhost:5601", From 5d63d8c0501b7fabed1f58a55402c287ecab4894 Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:34:49 -0800 Subject: [PATCH 4/6] Reduce Cypress retry count to 2 Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- dashboards-notifications/cypress.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards-notifications/cypress.json b/dashboards-notifications/cypress.json index f9193d14..fa5812d9 100644 --- a/dashboards-notifications/cypress.json +++ b/dashboards-notifications/cypress.json @@ -12,8 +12,8 @@ "responseTimeout": 60000, "defaultCommandTimeout": 60000, "retries": { - "runMode": 3, - "openMode": 3 + "runMode": 2, + "openMode": 2 }, "env": { "opensearch": "localhost:9200", From 54e8c0610a581b3d45d961a9c970dc77963bfab9 Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:35:11 -0800 Subject: [PATCH 5/6] Remove MacOS from Dashboard test matrix for now Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- .../dashboards-notifications-test-and-build-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml index 10e1da85..f2124463 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml @@ -25,7 +25,8 @@ jobs: # This setting says that all jobs should finish, even if one fails fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + # TODO: mac-os-latest was removed due to CI flakiness, we can revisit adding it back later + os: [ ubuntu-latest, windows-latest ] include: - os: windows-latest working_directory: X:\ From 929b782ff5e5accf2f01d586a2dd75e6463bef73 Mon Sep 17 00:00:00 2001 From: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Date: Tue, 6 Dec 2022 16:13:23 -0800 Subject: [PATCH 6/6] Remove include args for macos dashboard test Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> --- .../dashboards-notifications-test-and-build-workflow.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml index f2124463..e73ebee5 100644 --- a/.github/workflows/dashboards-notifications-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-notifications-test-and-build-workflow.yml @@ -25,7 +25,7 @@ jobs: # This setting says that all jobs should finish, even if one fails fail-fast: false matrix: - # TODO: mac-os-latest was removed due to CI flakiness, we can revisit adding it back later + # TODO: macos-latest was removed due to CI flakiness, we can revisit adding it back later os: [ ubuntu-latest, windows-latest ] include: - os: windows-latest @@ -35,8 +35,9 @@ jobs: - os: ubuntu-latest jest_test_args: --coverage cypress_cache_folder: ~/.cache/Cypress - - os: macos-latest - cypress_cache_folder: ~/Library/Caches/Cypress + # TODO: Add back when macos-latest is back in the test matrix +# - os: macos-latest +# cypress_cache_folder: ~/Library/Caches/Cypress name: Test and Build Dashboards Notifications on ${{ matrix.os }}