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

Bump golangci-lint to v1.19.1 #2941

Closed

Conversation

corneliusweig
Copy link
Contributor

Description

Bump golangci-lint to v0.19.1. I realized that in the previous PR I forgot to adjust the version and only fixed the issues from the new linter version 🤦‍♂️.

User facing changes

n/a

Before
n/a

After

n/a

Next PRs.

n/a

Submitter Checklist

n/a

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Mentions any output changes.
  • Adds documentation as needed: user docs, YAML reference, CLI reference.
  • Adds integration tests if needed.

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

  • The code flow looks good.
  • Unit test added.
  • User facing changes look good.

@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #2941 into master will not change coverage.
The diff coverage is n/a.

@priyawadhwa priyawadhwa added the kokoro:run runs the kokoro jobs on a PR label Sep 25, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Sep 25, 2019
@priyawadhwa
Copy link
Contributor

Hey @corneliusweig, looks like tests failed because golangci-lint ran out of memory:

Installing GolangCI-Lint
golangci/golangci-lint info checking GitHub for tag 'v1.19.1'
golangci/golangci-lint info found version: 1.19.1 for v1.19.1/linux/amd64
golangci/golangci-lint info installed /home/travis/gopath/bin/golangci-lint
INFO [config_reader] Used config file hack/golangci.yml 
INFO [lintersdb] Active 20 linters: [bodyclose deadcode goconst gocritic goimports golint gosimple govet ineffassign interfacer maligned misspell staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck] 
INFO [lintersdb] Optimized sublinters [staticcheck gosimple unused stylecheck] into metalinter megacheck 
INFO [loader] Go packages loading at mode 1023 (exports_file|files|name|types|types_info|compiled_files|imports|syntax|types_sizes|deps) took 5m19.577172535s 
INFO [loader] SSA repr building timing: packages building 607.769104ms, total 8.533377941s 
INFO Memory: 3026 samples, avg is 97.1MB, max is 2826.7MB 
INFO Execution took 6m0.984859028s                
INFO [runner] worker.2 took 38.160513962s with stages: golint: 25.465445897s, goimports: 7.793151868s, gocritic: 2.813798061s, unparam: 2.088080271s 
fatal error: runtime: out of memory

we could try tweaking the GOGC env variable as suggested in this comment?

@corneliusweig
Copy link
Contributor Author

Thanks @priyawadhwa for investigating this!
I also noticed quite excessive memory usage when running this locally. Let's see how a setting of 50 works.

@priyawadhwa priyawadhwa changed the title Bump golangci-lint to v0.19.1 Bump golangci-lint to v1.19.1 Sep 25, 2019
@priyawadhwa
Copy link
Contributor

Looks like it's still failing, we probably have to go lower. It turns out that Minikube ran into the same issue, and sets these variables for the linter to work with their CI, so we could try some combination of these as well.

According to the travis docs we should have 7.5 GB of memory, but looks like >8 is required a lot of the time based on this thread :(

@corneliusweig
Copy link
Contributor Author

I've reduced the setting one step further. Apparently, v0.19 makes the memory footprint a lot worse. So if this doesn't work reliably now, I'll close this and wait for the next release. They are actively working to reduce the memory consumption again.

@priyawadhwa
Copy link
Contributor

Different error this time!

./hack/linter.sh: line 35: GOLINT_JOBS: command not found
FAILED hack/linter.sh

it might need to be

GOLINT_JOBS=4

or something like that

Also, limit concurrency to 4 processes.
@corneliusweig
Copy link
Contributor Author

So I don't think it makes sense to upgrade to v0.19.x at the moment, given the memory issues with that version. I'll try again with the next release.

@corneliusweig corneliusweig deleted the w/update-linter branch September 26, 2019 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants