Run CI tests with max processes#7254
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReplaces a large platform-independent test allowlist with a smaller Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Actions Workflow
participant Runner as CI Runner
participant CoreDetect as Core Detection Step
participant RustPy as rustpython -m test
Workflow->>Runner: start job
Runner->>CoreDetect: execute core detection (os.process_cpu_count)
CoreDetect-->>Workflow: outputs.cores
Workflow->>RustPy: run CPython tests (-j ${{steps.cores.outputs.cores}}, -x FLAKY_MP_TESTS, matrix args/skips)
RustPy-->>Workflow: report parallel test results
Workflow->>RustPy: run FLAKY_MP_TESTS (-j 1, matrix args/skips)
RustPy-->>Workflow: report flaky-mp test results
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
9ad8f9f to
7f1ca40
Compare
March 17, 2026 12:16
314686f to
ea0d06e
Compare
March 17, 2026 13:49
|
Whats the option cpython is using? |
Sorry, something went wrong.
CPython uses max processes for their CI (from what I can tell) |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 243-249: The "Detect available cores" step is calling a
non-existent Python function os.process_cpu_count(); update the step (id: cores)
to avoid Python and use bash instead: detect CPU count with a POSIX-safe command
such as nproc or getconf _NPROCESSORS_ONLN (falling back to 2 if detection
fails), assign the result to the cores variable and then echo "cores=${cores}"
>> $GITHUB_OUTPUT; ensure the step retains shell: bash and preserves the output
key name and id (cores) so downstream jobs still read the value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 23cc4bdc-425b-4286-9c21-25706e3ebe20
📒 Files selected for processing (1)
.github/workflows/ci.yaml
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/ci.yaml (1)
244-249: ⚠️ Potential issue | 🟠 MajorFix
os.process_cpu_count()None handling and quote$GITHUB_OUTPUT.Line 248 calls
os.process_cpu_count(), which returnsNonein Python 3.14 when the usable CPU count cannot be determined. This causes the step to emitcores=None, which will fail downstream when passed to-j. Additionally,$GITHUB_OUTPUTon line 249 is unquoted, triggering shellcheck SC2086.🛠️ Proposed fix
- name: Detect available cores id: cores shell: bash run: | - cores=$(python -c 'print(__import__("os").process_cpu_count())') - echo "cores=${cores}" >> $GITHUB_OUTPUT + cores="$(python -c 'import os; print(os.process_cpu_count() or 1)')" + echo "cores=${cores}" >> "$GITHUB_OUTPUT"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yaml around lines 244 - 249, The GitHub Actions step named "Detect available cores" (id: cores) uses python to call os.process_cpu_count(), which can return None in Python 3.14 and writes unquoted $GITHUB_OUTPUT; update the python snippet to coerce a safe integer fallback (e.g., use os.cpu_count() or process_cpu_count() or default to 1 when None) and ensure you echo the output with quoted variable expansion (use "$GITHUB_OUTPUT") so downstream `-j` receives a numeric value and shellcheck SC2086 is avoided.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 251-254: The workflow change altered which tests run while also
changing parallelism; revert the test invocation in the "Run CPython tests" step
so the matrix-driven test split is preserved and only the -j value is varied:
keep the original joins/skip logic (the use of matrix.skips and
matrix.extra_test_args) exactly as before and do not narrow the suite to only
exclude FLAKY_MP_TESTS here; instead only change the -j argument coming from
steps.cores.outputs.cores so this PR isolates the max-process (‑j) experiment
without changing the test coverage shape.
---
Duplicate comments:
In @.github/workflows/ci.yaml:
- Around line 244-249: The GitHub Actions step named "Detect available cores"
(id: cores) uses python to call os.process_cpu_count(), which can return None in
Python 3.14 and writes unquoted $GITHUB_OUTPUT; update the python snippet to
coerce a safe integer fallback (e.g., use os.cpu_count() or process_cpu_count()
or default to 1 when None) and ensure you echo the output with quoted variable
expansion (use "$GITHUB_OUTPUT") so downstream `-j` receives a numeric value and
shellcheck SC2086 is avoided.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 5a9c912e-53d8-468b-84c8-c54d18ad90ad
📒 Files selected for processing (1)
.github/workflows/ci.yaml
Sorry, something went wrong.
2ef77f8
into
RustPython:main
Mar 20, 2026
* Run CI witb max cores * Step for flaky MP tests * Add `test_class` to flkay mp tests
* Run CI witb max cores * Step for flaky MP tests * Add `test_class` to flkay mp tests
Recently our CI has started to take around an hour, this will make it faster at the cost of stability. I want to see how faster / stable this effect the CI
Summary by CodeRabbit