This repository has been archived by the owner on May 30, 2024. It is now read-only.
reduce golangci-lint overhead for jenkins worker #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes suggested here appear to improve the overhead of the build process with the latest golangci-lint.
golangci/golangci-lint#337 (comment)
With 1.17.1 of golangci-lint we regularly see 10GB of RAM consumed while linting in local
testing.
Prior to the bump to 1.17.1, golangci-lint 1.15 was taking 6-8GB of RAM and
completing in 10s in local testing.
With the reduction in overhead to golangci-lint that this PR introduces,
linting consumes between 8-9GB of ram and completes in 30s using the same
environment.
The Crossplane Jenkins worker node has only 10GB of RAM available.
The intent here is to continue using latest
golangci-lint
with thecurrent Jenkins configuration (not increasing node memory), sacrificing some time. Additional
measures can be made, such as using
--fast
tests only or further increasing theLINT_GOGC
value. Ultimately we may prefer to revert togolangci-lint
v1.15.0 and wait for a version that doesn't inflate the RAM used so significantly.https://github.com/golangci/golangci-lint#configuration
https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint
Relates to: crossplane/crossplane#577
Closes #71