Skip to content

Commit

Permalink
chore(ci): Retry yarn install on fail (random networks issues) (cube-…
Browse files Browse the repository at this point in the history
…js#5125)

From time to time, there are network issues on GitHub runners. They still didn't fix them, and it's a huge problem to restart jobs everytime.

- Windows: actions/runner-images#5850
- Linux/MacOS: actions/runner-images#5615
  • Loading branch information
ovr authored and nayakravi committed Sep 13, 2022
1 parent 6bc9528 commit 9a57d99
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 15 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/birdbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build client
run: yarn build
- name: Lerna tsc
Expand Down Expand Up @@ -113,7 +121,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build client
run: yarn build
- name: Lerna tsc
Expand Down Expand Up @@ -174,7 +190,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Birdbox
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build Core Client libraries
run: yarn build
- name: Build other packages
Expand Down Expand Up @@ -109,7 +117,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build native
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
Expand Down Expand Up @@ -180,9 +196,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
run: yarn install --frozen-lockfile
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build native
run: cd packages/cubejs-backend-native && npm run native:build-release
- name: Upload artifact
Expand Down
70 changes: 63 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Build client
Expand Down Expand Up @@ -133,7 +141,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: NPM lint
run: yarn lint:npm
- name: Lerna lint
Expand Down Expand Up @@ -175,7 +191,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Check Yarn lock wasn't modified
run: if [ "$(git status | grep nothing)x" = "x" ]; then echo "Non empty changeset after lerna bootstrap"; git status; exit 1; else echo "Nothing to commit. Proceeding"; fi;
- name: Build Core Client libraries
Expand Down Expand Up @@ -235,7 +259,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Run Redis Integration with Redis Driver
Expand Down Expand Up @@ -312,7 +344,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Run Integration tests for ${{ matrix.db }} matrix
Expand Down Expand Up @@ -360,7 +400,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build client
run: yarn build
- name: Lerna tsc
Expand Down Expand Up @@ -485,7 +533,15 @@ jobs:
- name: Set Yarn version
run: yarn policies set-version v1.22.5
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build client
run: yarn build
- name: Lerna tsc
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/rust-cubesql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,15 @@ jobs:
restore-keys: |
${{ runner.os }}-workspace-main-${{ matrix.node-version }}-
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build native
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
Expand Down Expand Up @@ -242,9 +250,15 @@ jobs:
restore-keys: |
${{ runner.os }}-workspace-main-${{ matrix.node-version }}-
- name: Yarn install
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
run: yarn install --frozen-lockfile
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Build native
env:
CUBEJS_NATIVE_INTERNAL_DEBUG: true
Expand Down

0 comments on commit 9a57d99

Please sign in to comment.