Skip to content

Commit

Permalink
Make OSD Bootstrap more sturdy in CI (#901)
Browse files Browse the repository at this point in the history
* Apply updates from OSD

Signed-off-by: Simeon Widdis <[email protected]>

* Revert accidental flyout change

Signed-off-by: Simeon Widdis <[email protected]>

* Add bootstrap cache to CI

Signed-off-by: Simeon Widdis <[email protected]>

* Avoid nested directory traversal on cache hashing

Signed-off-by: Simeon Widdis <[email protected]>

* Tweak path traversal again

Signed-off-by: Simeon Widdis <[email protected]>

* Fix order of operations for cd

Signed-off-by: Simeon Widdis <[email protected]>

* Fix CDs again

Signed-off-by: Simeon Widdis <[email protected]>

* Debugging: Add ls

Signed-off-by: Simeon Widdis <[email protected]>

* Fix CDs (again)

Signed-off-by: Simeon Widdis <[email protected]>

* Fix directories for caching

Signed-off-by: Simeon Widdis <[email protected]>

* Update cache behavior based on actual bootstrap function

Signed-off-by: Simeon Widdis <[email protected]>

* Re-add plugin linking

Signed-off-by: Simeon Widdis <[email protected]>

* Make hash target smaller

Signed-off-by: Simeon Widdis <[email protected]>

* Add a restore key to the cache

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis authored and derek-ho committed Sep 6, 2023
1 parent 8741eb2 commit 7001104
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand All @@ -80,4 +91,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: dashboards-observability-${{ matrix.os }}
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build

0 comments on commit 7001104

Please sign in to comment.