Skip to content

Run pylint with a single process - #295

Draft
lolgab wants to merge 1 commit into
masterfrom
pylint-single-job
Draft

lolgab wants to merge 1 commit into
masterfrom
pylint-single-job

Conversation

@lolgab

@lolgab lolgab commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Tool pods have a memory limit but no CPU limit, so os.cpu_count() returns the node's core count (16–64). When Codacy writes no rcfile, pylint reads the analysed repo's own config from /src, and a jobs=0 there makes pylint start one worker process per node core (up to 10, one per file in the chunk), each loading the plugins, against a 1Gi limit and a 500m CPU request.

This passes --jobs=1 on every pylint call, so the wrapper always runs one pylint process, whatever the repo config says. In pylint 4.0.8, command-line options are parsed after the config file (pylint/config/config_initialization.py), so --jobs=1 wins over jobs in a pylintrc, setup.cfg or pyproject.toml. Checked locally: with a repo .pylintrc or pyproject.toml setting jobs = 0, the effective jobs goes from the core count to 1.

Same fix as codacy/codacy-opengrep#50. Same change in codacy/codacy-pylint.

  • After deploy, 7 days: ToolOutOfMemory count for pylintpython3 vs the 7 days before
  • After deploy, 7 days: run-time p99 and timeouts vs the 7 days before

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant