Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action times out on latest golangci-lint version #519

Closed
pauleibye opened this issue Jul 18, 2022 · 9 comments
Closed

action times out on latest golangci-lint version #519

pauleibye opened this issue Jul 18, 2022 · 9 comments
Labels
question Further information is requested upstream related the golangci-lint but not to the action

Comments

@pauleibye
Copy link

Golangci-lint just had a new release, 1.47.0, which broke our lint action. The action would spin and timeout when running the golangci-lint command with or without args.

Example log where the action would hang:
Running [/home/runner/golangci-lint-1.47.0-linux-amd64/golangci-lint run --out-format=github-actions --new-from-patch=/tmp/tmp-1669-7BzhRHngF7zi/pull.patch --new=false --new-from-rev=] in [] ...

Downgrading the golangci-lint version to 1.46.2 fixed the action for us.

@iwata
Copy link

iwata commented Jul 19, 2022

I'm having the same problem too.

@sbueringer
Copy link

sbueringer commented Jul 19, 2022

I have the same issue.

Not sure if it's specific to my case but when I run the action locally with https://github.com/nektos/act I can reproduce the issue. When I exec into the action and run golangci-lint I run into the following panic:

docker exec -it 13d3 /bin/bash
root@sbuerin:/home/sbuerin/code/src/sigs.k8s.io/cluster-api# /root/golangci-lint-1.47.0-linux-amd64/golangci-lint
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
        github.com/go-critic/go-critic@v0.6.3/checkers/embedded_rules.go:47 +0x4b4

(The binary seems to just panic in general, independent of in which folder it is called, Go 1.17 or Go 1.18, gocritic enabled or disabled)

P.S. I reproduced this with kubernetes-sigs/cluster-api#6943 + act -j golangci

@TenSt
Copy link

TenSt commented Jul 19, 2022

I have the same issue. In my case, the action would just run without stopping and I need to stop them manually. All works fine on v1.46.2, so we're downgrading for the time being too.

@ldez
Copy link
Member

ldez commented Jul 19, 2022

If you have the same kind of problem, I need:

  • your Go version
  • your golangci-lint configuration
  • the action configuration
  • a public repo (if possible)

@TenSt
Copy link

TenSt commented Jul 19, 2022

@ldez, here it is:

  • Go 1.18.x
  • we use the default one
  • job config:
go-lint:
  name: Lint Go Applications
  if: needs.vars.outputs.go_changes == 'true'
  runs-on: ubuntu-latest
  needs:
    - vars

  steps:
    - uses: actions/checkout@v3

    - uses: actions/setup-go@v3
      with:
        go-version: "1.18.x"
        cache: true
        cache-dependency-path: go/go.sum

    - name: golangci-lint
      uses: golangci/golangci-lint-action@v3.2.0
      with:
        working-directory: go
        version: latest
        args: --timeout 5m
  • the repo is private, so I can't share

@flemzord
Copy link

I have a same problem in my github action

@sbueringer
Copy link

I bumped to Golangci lint v1.47.1. It looks better now.

Previously it timed out after 6 hours, now I'm hitting my own timeout of 10 minutes (action times out after 15m).

We are bumping from v1.44=>v1.47.1 and will try to figure out if it's expected that the linter now takes ~ 15 min instead of 6-7 min before.

alex-aizman added a commit to NVIDIA/aistore that referenced this issue Jul 19, 2022
* github workflow: use Go latest (v1.18.4 at the moment)
  * undo 7b8f281
* github workflow: use golangci-lint latest (v1.47.1)
  * undo 841a6cc
  * see golangci/golangci-lint-action#519
* closes #1174
* closes #1175
* tests: tweak create-multiobj-arch

Signed-off-by: Alex Aizman <alex.aizman@gmail.com>
@ldez
Copy link
Member

ldez commented Jul 20, 2022

I think the problem is solved, for the performance issue you can follow golangci/golangci-lint#2997

@ldez ldez closed this as completed Jul 20, 2022
@ldez ldez added question Further information is requested upstream related the golangci-lint but not to the action labels Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested upstream related the golangci-lint but not to the action
Projects
None yet
Development

No branches or pull requests

6 participants