From 7256a7906781be6b9312494bd76b53851e2cb3d5 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 15 Nov 2022 10:39:47 -0600 Subject: [PATCH] Add retry and enable UTs for Windows (#1215) Added a retry around the the bootstrap that previously failed due to network issues. Ran the new version of this workflow 100 iterations on linux and windows, both passed at 100% [1]. Without the retry during a run of 100 iterations [2], the windows test failed once during the bootstrap. If we see future issues, we could attempt to add retries to them following this same pattern. [1] https://github.com/peternied/security-dashboards-plugin/actions/runs/3449518073 [2] https://github.com/peternied/security-dashboards-plugin/actions/runs/3449040181 Signed-off-by: Peter Nied (cherry picked from commit 3abb70774c42feecf9aa8202f959530be05bc2a3) --- .github/actions/install-dashboards/action.yml | 8 +++++--- .github/workflows/unit-test.yml | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/actions/install-dashboards/action.yml b/.github/actions/install-dashboards/action.yml index 18721933d..7dae184e8 100644 --- a/.github/actions/install-dashboards/action.yml +++ b/.github/actions/install-dashboards/action.yml @@ -78,6 +78,8 @@ runs: working-directory: OpenSearch-Dashboards shell: bash - - run: yarn osd bootstrap --oss - working-directory: OpenSearch-Dashboards - shell: bash + - uses: nick-fields/retry@v2 + with: + timeout_minutes: 20 + max_attempts: 2 + command: yarn --cwd OpenSearch-Dashboards osd bootstrap --oss diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d80034b67..63c5feb57 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -8,10 +8,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest ] + os: [ ubuntu-latest , windows-latest, macos-latest ] runs-on: ${{ matrix.os }} steps: + - name: Enable longer filenames + if: ${{ matrix.os == 'windows-latest' }} + run: git config --system core.longpaths true + - uses: actions/checkout@v2 - id: install-dashboards