From 70011045fb13e3052e471db3c48c8def866ca749 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 11 Aug 2023 10:37:12 -0700 Subject: [PATCH] Make OSD Bootstrap more sturdy in CI (#901) * Apply updates from OSD Signed-off-by: Simeon Widdis * Revert accidental flyout change Signed-off-by: Simeon Widdis * Add bootstrap cache to CI Signed-off-by: Simeon Widdis * Avoid nested directory traversal on cache hashing Signed-off-by: Simeon Widdis * Tweak path traversal again Signed-off-by: Simeon Widdis * Fix order of operations for cd Signed-off-by: Simeon Widdis * Fix CDs again Signed-off-by: Simeon Widdis * Debugging: Add ls Signed-off-by: Simeon Widdis * Fix CDs (again) Signed-off-by: Simeon Widdis * Fix directories for caching Signed-off-by: Simeon Widdis * Update cache behavior based on actual bootstrap function Signed-off-by: Simeon Widdis * Re-add plugin linking Signed-off-by: Simeon Widdis * Make hash target smaller Signed-off-by: Simeon Widdis * Add a restore key to the cache Signed-off-by: Simeon Widdis --------- Signed-off-by: Simeon Widdis --- ...ds-observability-test-and-build-workflow.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dashboards-observability-test-and-build-workflow.yml b/.github/workflows/dashboards-observability-test-and-build-workflow.yml index 064f949ce1..e9002ab811 100644 --- a/.github/workflows/dashboards-observability-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-observability-test-and-build-workflow.yml @@ -14,6 +14,8 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] + # Since Windows is inconsistent, we want to let other OSes run on a fail + fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -51,11 +53,20 @@ jobs: with: path: OpenSearch-Dashboards/plugins/dashboards-observability + - name: Load Plugin Bootstrap cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + **/target + key: ${{ runner.os }}-bootstrap-${{ hashFiles('OpenSearch-Dashboards/yarn.lock', 'OpenSearch-Dashboards/plugins/dashboards-observability/yarn.lock') }} + restore-keys: ${{ runner.os }}-bootstrap- - name: Plugin Bootstrap run: | - cd OpenSearch-Dashboards/plugins/dashboards-observability - yarn osd bootstrap + cd OpenSearch-Dashboards + yarn config set network-timeout 1000000 -g + yarn osd bootstrap || yarn osd bootstrap - name: Test all dashboards-observability modules run: | @@ -80,4 +91,4 @@ jobs: uses: actions/upload-artifact@v1 with: name: dashboards-observability-${{ matrix.os }} - path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build \ No newline at end of file + path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build