github-action
github-action copied to clipboard
Random error: `Error: Parallel webhook error:TypeError: Cannot read property 'done' of undefined, undefined`
We are seeing this error randomly happening more today:
/home/runner/work/_actions/coverallsapp/github-action/master/lib/run.js:97
throw new Error('Parallel webhook error:' + err + ', ' + JSON.stringify(data));
^
Error: Parallel webhook error:TypeError: Cannot read property 'done' of undefined, undefined
at Request._callback (/home/runner/work/_actions/coverallsapp/github-action/master/lib/run.js:97:31)
at Request.self.callback (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:185:22)
at Request.emit (events.js:210:5)
at Request.<anonymous> (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:1161:10)
at Request.emit (events.js:210:5)
at IncomingMessage.<anonymous> (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:299:28)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1184:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Is there some error on coveralls app that might correlate?
The error is happening in the code_coverage
run - see config below.
Out workflow file is as follows:
...
backend_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Set N number of parallel jobs you want to run tests on.
# Use higher number if you have slow tests to split them on more parallel jobs.
# Remember to update ci_node_index below to 0..N-1
ci_node_total: [5]
# set N-1 indexes for parallel jobs
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
ci_node_index: [0, 1, 2, 3, 4]
steps:
...
- name: Run Rspec
run: bundle exec parallel_test -n $PARALLEL_TESTS_CONCURRENCY -e './bin/parallel_tests'
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
git-commit: ${{ github.event.pull_request.head.sha || github.sha }}
flag-name: run-${{ matrix.ci_node_index }}-${{ github.run_id }}
path-to-lcov: ${{ env.COVERAGE_LCOV_FILE_PATH }}
parallel: true
code_coverage:
needs: backend_test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
git-commit: ${{ github.event.pull_request.head.sha || github.sha }}
parallel-finished: true
...
I'm seeing the same error on our monorepo using the parallel flag.
Here is our workflow:
name: API CI tests
on:
push:
branches:
- master
pull_request:
jobs:
test_apps:
strategy:
matrix:
app:
- [...]
runs-on: ubuntu-latest
name: Build & test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
id: install
run: |
cd ${{ matrix.app }} && npm ci
- name: Run build
id: build
run: |
cd ${{ matrix.app }} && npm run build
- name: Use node v14.16.1
uses: actions/setup-node@v1
with:
node-version: 14.16.1
- name: Run tests
id: test
run: |
cd ${{ matrix.app }} && npm run test
- name: Report coverage
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: test-${{ matrix.app }}
path-to-lcov: ${{ matrix.app }}/coverage/lcov.info
base-path: ${{ matrix.app }}
parallel: true
finish:
name: Send Coverage
needs: test_apps
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Edit: I tried coverallsapp/[email protected]
and coverallsapp/github-action@master
. Both failed with the same error in the last step of the workflow.
The strange thing is, that even with this failure on the code_coverage
step, everything is still working for us.
The different matrix-runs coverages are being reported and the overall coverage report also works.
Seeing the same issue today: https://github.com/fourTheorem/slic-watch/pull/62/checks?check_run_id=3462279083
Seeing the same issue since yesterday: https://github.com/ecamp/ecamp3/pull/1859/checks?check_run_id=3461926954
I also encountered this problem a few days ago, but coveralls seems to be working fine now.