Skip to content

Commit

Permalink
[CI] update yarn timeout for GitHub workflow on Windows
Browse files Browse the repository at this point in the history
Yarn 1.x seems to have an issue with timing on windows and
mac when running.

Source:
yarnpkg/yarn#8242 (comment)

Increase timeout for Windows only.

Issue:
n/a

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Jan 5, 2023
1 parent e1b89fc commit 2f50cc7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 600000 -g
yarn cache clean
# https://github.com/yarnpkg/yarn/issues/8242#issuecomment-776561223
# Increase network timeout for Windows, retry once if bootstrap fails
- name: Run bootstrap
run: yarn osd bootstrap
run: |
yarn cache clean
yarn config set network-timeout 1000000 -g
yarn osd bootstrap || yarn osd bootstrap
- name: Run linter
id: linter
Expand Down Expand Up @@ -212,14 +215,17 @@ jobs:
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 600000 -g
yarn cache clean
- name: Setup chromedriver
run: node scripts/upgrade_chromedriver.js

# https://github.com/yarnpkg/yarn/issues/8242#issuecomment-776561223
# Increase network timeout for Windows, retry once if bootstrap fails
- name: Run bootstrap
run: yarn osd bootstrap
run: |
yarn cache clean
yarn config set network-timeout 1000000 -g
yarn osd bootstrap || yarn osd bootstrap
- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixes misleading embaddable plugin error message ([#3043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3043))
- [MD] Update dummy url in tests to follow lychee url allowlist ([#3099](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3099))
- Adds config override to fix obsolete theme:version config value of v8 (beta) rendering issue ([#3045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3045))

- [CI] Update test workflow to increase network-timeout for yarn for installing dependencies ([#3118](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3118))

### 🚞 Infrastructure

Expand Down
5 changes: 5 additions & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ $ npm i -g yarn
$ yarn osd bootstrap # This command will also install npm dependencies
```

If you experience a network timeout while bootstrapping, you can update the timeout by configuring it in the `.yarnrc`. For example:
```
network-timeout 1000000
```

### Configure OpenSearch Dashboards

*This step is only mandatory if you have https/authentication enabled, or if you use the OpenSearch Docker image in its default configuration.*
Expand Down

0 comments on commit 2f50cc7

Please sign in to comment.