-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make OSD Bootstrap more sturdy in CI #901
Changes from all commits
180d8c6
25cbc24
a4cbfd2
ca67814
8aa5711
2e40d54
147d2ce
23e7b4d
3743fdd
6eaf56d
f5620e1
3c63785
9216b55
ea657f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this seconds? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Milliseconds, this PR uses the same number as is used in the OpenSearch Dashboards CI, which in turn is inspired by a related issue on yarn that suggests a similar approach with a number that's also in that ballpark. |
||
yarn osd bootstrap || yarn osd bootstrap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is ok but there's also a retry workflow https://github.com/marketplace/actions/retry-step |
||
|
||
- 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 | ||
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it caching target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It showed up when I scanned for what files bootstrap was making, I assumed it may be important. I don't know the technical details of what bootstrap does, so I might have overselected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure why bootstrap would touch target. target is the transpiled javascript from source code (public ts/tsx) to be executed in browser,
yarn start
(optimizing phase) andyarn build
would update target.caching it probably won't cause an issue even if your key does not consider source code changes (because
yarn build
will update target anyways), but i don't think it should be cached. it's not really related to dependencies