-
- Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
Description
Welcome
- Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've included all information below (version, config, etc).
Description of the problem
We have a lot of github workflows that use golangci-lint-action
as part of our CICD system.
Recently, we encounter a problem in the Post action
of golangci-lint-action
, which seems to occur randomly. Currently, when we encounter it, we just rerun the failed job and the second attempt works.
Post action log with the error
Post job cleanup. /usr/bin/tar --posix -cf cache.tgz --exclude cache.tgz -P -C /home/runner/work/flow/flow --files-from manifest.txt -z Warning: Failed to save: Cache service responded with 429 during upload chunk. Saved cache for golangci-lint from paths '/home/runner/.cache/golangci-lint, /home/runner/.cache/go-build, /home/runner/go/pkg, gzip, 1.0' in 302032ms /home/runner/work/_actions/golangci/golangci-lint-action/v3.4.0/dist/post_run/index.js:433 throw new Error(`Cache upload failed because file read failed with ${error.message}`); ^ Error: Cache upload failed because file read failed with EBADF: bad file descriptor, read at ReadStream.<anonymous> (/home/runner/work/_actions/golangci/golangci-lint-action/v3.4.0/dist/post_run/index.js:433:31) at ReadStream.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at errorOrDestroy (node:internal/streams/destroy:220:7) at node:internal/fs/streams:258:9 at FSReqCallback.wrapper [as oncomplete] (node:fs:660:5)
I searched and found similar reports of the underlying error (Error: Cache upload failed because file read failed with EBADF
), but all them were reported on other github actions and were (allegedly) solved in their respective repositories.
Version of golangci-lint
1.51.2
Version of the GitHub Action
3.4.0
Workflow file
golangci: if: ${{github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'WIP')}} name: Linter needs: [resolve-modules, validate-matrix] runs-on: ubuntu-latest strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Setup Go uses: actions/setup-go@v3 with: go-version: '1.18' - name: Checkout uses: actions/checkout@v3 - name: Checkout Submodules uses: ./.github/actions/checkout-submodules - name: golangci-lint uses: golangci/golangci-lint-action@v3.4.0 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" with: version: latest working-directory: ${{ matrix.workdir }} args: --out-${NO_FUTURE}format colored-line-number --timeout 5m --verbose
Go version
1.18
Code example or link to a public repository
Unrelated (AFAIK)
mtibben, eneskaya, JackFazackerley, johnwook, HuSharp and 4 more