From 750a32c524eb1c8fbfa4135005aacc647080537c Mon Sep 17 00:00:00 2001 From: Jialiang Liang <109499885+RyanL1997@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:54:57 -0800 Subject: [PATCH] [Bug Fix] Fix the bootstrap failure on the fresh run (#270) * Update the yarn.lock and remove the retries for plugins bootstrap in CIs Signed-off-by: Ryan Liang * Update the snapshots Signed-off-by: Ryan Liang --------- Signed-off-by: Ryan Liang --- .../workflows/cypress-e2e-reporting-test.yml | 16 +--- .github/workflows/ftr-e2e-reporting-test.yml | 16 +--- .../__snapshots__/main.test.tsx.snap | 84 +++++++++++++++---- .../report_definitions_table.test.tsx.snap | 42 ++++++++-- .../__snapshots__/reports_table.test.tsx.snap | 54 ++++++++++-- .../report_definition_details.test.tsx.snap | 12 ++- .../report_details.test.tsx.snap | 12 ++- .../report_settings.test.tsx.snap | 18 +++- 8 files changed, 189 insertions(+), 65 deletions(-) diff --git a/.github/workflows/cypress-e2e-reporting-test.yml b/.github/workflows/cypress-e2e-reporting-test.yml index 1aefb282..c04040b3 100644 --- a/.github/workflows/cypress-e2e-reporting-test.yml +++ b/.github/workflows/cypress-e2e-reporting-test.yml @@ -115,22 +115,10 @@ jobs: working-directory: OpenSearch-Dashboards shell: bash - - name: OpenSearch Dashboards Plugin Bootstrap + - name: Boodstrap Opensearch Dashboards run: | - max_retries=3 - count=0 - until yarn osd bootstrap; do - exit_code=$? - count=$(($count + 1)) - echo "Attempt $count/$max_retries failed with exit code $exit_code, retrying..." - if [ $count -ge $max_retries ]; then - echo "Reached maximum retry attempts, stopping..." - exit $exit_code - fi - sleep 5 # Wait for 5 seconds before retrying - done + yarn osd bootstrap working-directory: OpenSearch-Dashboards - shell: bash - name: Run Opensearch Dashboards with Dashboards Reporting Plugin Installed run: | diff --git a/.github/workflows/ftr-e2e-reporting-test.yml b/.github/workflows/ftr-e2e-reporting-test.yml index 8fee8ec9..0226d9d6 100644 --- a/.github/workflows/ftr-e2e-reporting-test.yml +++ b/.github/workflows/ftr-e2e-reporting-test.yml @@ -115,22 +115,10 @@ jobs: working-directory: OpenSearch-Dashboards shell: bash - - name: OpenSearch Dashboards Plugin Bootstrap + - name: Boodstrap Opensearch Dashboards run: | - max_retries=3 - count=0 - until yarn osd bootstrap; do - exit_code=$? - count=$(($count + 1)) - echo "Attempt $count/$max_retries failed with exit code $exit_code, retrying..." - if [ $count -ge $max_retries ]; then - echo "Reached maximum retry attempts, stopping..." - exit $exit_code - fi - sleep 5 # Wait for 5 seconds before retrying - done + yarn osd bootstrap working-directory: OpenSearch-Dashboards - shell: bash - name: Run Opensearch Dashboards with Dashboards Reporting Plugin Installed run: | diff --git a/public/components/main/__tests__/__snapshots__/main.test.tsx.snap b/public/components/main/__tests__/__snapshots__/main.test.tsx.snap index ea65b51c..3916766d 100644 --- a/public/components/main/__tests__/__snapshots__/main.test.tsx.snap +++ b/public/components/main/__tests__/__snapshots__/main.test.tsx.snap @@ -44,7 +44,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -92,7 +96,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -127,7 +135,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -166,7 +178,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -229,7 +245,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -431,7 +451,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -509,7 +537,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -577,7 +609,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -635,7 +671,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -837,7 +877,11 @@ exports[`
panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1866,7 +1914,11 @@ exports[`
panel render component after create success 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1888,7 +1940,11 @@ exports[`
panel render component after create success 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/main/__tests__/__snapshots__/report_definitions_table.test.tsx.snap b/public/components/main/__tests__/__snapshots__/report_definitions_table.test.tsx.snap index ee962a4d..a37a9c45 100644 --- a/public/components/main/__tests__/__snapshots__/report_definitions_table.test.tsx.snap +++ b/public/components/main/__tests__/__snapshots__/report_definitions_table.test.tsx.snap @@ -37,7 +37,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -95,7 +99,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -502,7 +510,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -537,7 +549,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
    panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -899,7 +919,11 @@ exports[` panel render empty table 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + panel render empty table 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/main/__tests__/__snapshots__/reports_table.test.tsx.snap b/public/components/main/__tests__/__snapshots__/reports_table.test.tsx.snap index 392491e0..ce0763f7 100644 --- a/public/components/main/__tests__/__snapshots__/reports_table.test.tsx.snap +++ b/public/components/main/__tests__/__snapshots__/reports_table.test.tsx.snap @@ -36,7 +36,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -71,7 +75,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -110,7 +118,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -173,7 +185,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -369,7 +385,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -458,7 +478,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -499,7 +523,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -534,7 +562,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/main/report_definition_details/__tests__/__snapshots__/report_definition_details.test.tsx.snap b/public/components/main/report_definition_details/__tests__/__snapshots__/report_definition_details.test.tsx.snap index 36505dcc..7bf41540 100644 --- a/public/components/main/report_definition_details/__tests__/__snapshots__/report_definition_details.test.tsx.snap +++ b/public/components/main/report_definition_details/__tests__/__snapshots__/report_definition_details.test.tsx.snap @@ -1042,7 +1042,11 @@ exports[` panel render on demand definition details 1 viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1099,7 +1103,11 @@ exports[` panel render on demand definition details 1 viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/main/report_details/__tests__/__snapshots__/report_details.test.tsx.snap b/public/components/main/report_details/__tests__/__snapshots__/report_details.test.tsx.snap index 08ffd2d1..80620d7f 100644 --- a/public/components/main/report_details/__tests__/__snapshots__/report_details.test.tsx.snap +++ b/public/components/main/report_details/__tests__/__snapshots__/report_details.test.tsx.snap @@ -575,7 +575,11 @@ exports[` panel render on-demand component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -631,7 +635,11 @@ exports[` panel render on-demand component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/report_definitions/report_settings/__tests__/__snapshots__/report_settings.test.tsx.snap b/public/components/report_definitions/report_settings/__tests__/__snapshots__/report_settings.test.tsx.snap index 917eface..5c67016b 100644 --- a/public/components/report_definitions/report_settings/__tests__/__snapshots__/report_settings.test.tsx.snap +++ b/public/components/report_definitions/report_settings/__tests__/__snapshots__/report_settings.test.tsx.snap @@ -2658,7 +2658,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2724,7 +2728,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2737,7 +2745,11 @@ exports[` panel render component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +