Skip to content

Commit

Permalink
[Manual backport 1.3][CI] update yarn timeout for GitHub workflow on …
Browse files Browse the repository at this point in the history
…Windows

Backport PR:
opensearch-project#3118

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
  • Loading branch information
kavilla authored and ananzh committed Jan 27, 2023
1 parent a855701 commit 7192af2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ jobs:
restore-keys: |
yarn-
# 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
if ($LASTEXITCODE) { yarn osd bootstrap }
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 @@ -294,10 +297,13 @@ jobs:
Remove-Item -Recurse -Force "$Env:Programfiles/Google/Chrome/Application/*"
Copy-Item -Force -Recurse "${{steps.download-chrome.outputs.path}}/*" "$Env:Programfiles/Google/Chrome/Application"
# 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
if ($LASTEXITCODE) { yarn osd bootstrap }
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607))
- Removed Leftover X Pack references ([#2638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2638))
- Bumped `del` version to fix MacOS race condition ([#2847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2873))
- [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 7192af2

Please sign in to comment.