-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix some parts of cron-ci workflow #6724
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
Conversation
When the `extra_tests/jsontests.py` script was added, it was presumably during the time when Python versions 3.5 to 3.8 were in use. At that time, `test.libregrtest.runtest` was a valid path, but from CPython version 3.11 onwards, the path changed to `test.libregrtest.findtests`.
Replace the ssl feature with ssl-rustls in both the CARGO_ARGS environment variable and the cargo-llvm-cov test command to fix the cron-ci workflow. Since 1a783fc, it is disallowed to use ssl manually.
…_test_runner inspect.getargspec() was removed in Python 3.11, causing jsontests.py to fail with "TypeError: 'NoneType' object is not iterable" when running on RustPython (which targets Python 3.13). The get_function_args() function was silently catching the AttributeError and returning None, which then caused the error in store_class_fields() when trying to iterate over None. > https://docs.python.org/3/whatsnew/3.11.html > The getargspec() function, deprecated since Python 3.0; use > inspect.signature() or inspect.getfullargspec() instead. Co-Authored-By: Claude Opus 4.5 <[email protected]>
📝 WalkthroughWalkthroughCI workflow updated to use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
Since rustpython-venvlauncher is Windows-only, it disables the project in the cron-ci workflow.
Co-authored-by: fanninpm <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/cron-ci.yaml (1)
96-100: Changessltossl-rustlson line 98 for consistency with the environment configuration.The
CARGO_ARGSenvironment variable specifiesssl-rustls, but line 98 passes--features "ssl,sqlite"to the script. Sincewhats_left.pypasses these features directly to cargo, it should usessl-rustlsto match the rest of the workflow.
🧹 Nitpick comments (1)
.github/workflows/cron-ci.yaml (1)
14-15: Consider usingCARGO_ARGSor removing it.
CARGO_ARGSis defined but never referenced. The features are hardcoded in line 35, creating duplication. IfCARGO_ARGSis updated, line 35 won't reflect the change.♻️ Suggestion: Use the env var in cargo commands
- name: Run cargo-llvm-cov with Rust tests. - run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --verbose --no-default-features --features stdlib,importlib,encodings,ssl-rustls,jit + run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --verbose ${{ env.CARGO_ARGS }}Alternatively, remove
CARGO_ARGSif it's not intended to be shared across steps.Also applies to: 34-35
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/cron-ci.yaml
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: Applies to Lib/** : In the `Lib/` directory, when modifications are necessary, add a `# TODO: RUSTPYTHON` comment or use `unittest.skip('TODO: RustPython <reason>')` or `unittest.expectedFailure` with `# TODO: RUSTPYTHON <reason>` comment
Applied to files:
.github/workflows/cron-ci.yaml
📚 Learning: 2025-09-28T22:22:55.921Z
Learnt from: reactive-firewall
Repo: RustPython/RustPython PR: 6176
File: .github/workflows/Check_Tests.yml:133-141
Timestamp: 2025-09-28T22:22:55.921Z
Learning: In the RustPython project's CI-5974-Test-RustPython-Integration action, the override-rustpython-path input is marked as required but has runtime fallback logic that defaults to RUSTPYTHONPATH environment variable or "Lib" if neither is provided, making explicit specification unnecessary in most cases.
Applied to files:
.github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: When modifying bytecode instructions, perform a full clean build by running `rm -r target/debug/build/rustpython-* && find . | grep -E '\.pyc$' | xargs rm -r`
Applied to files:
.github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: When testing Python code, always use RustPython instead of the standard `python` command; use `cargo run -- script.py` or `cargo run` for interactive REPL
Applied to files:
.github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: Applies to **/*.rs : Always run clippy to lint code (`cargo clippy`) before completing tasks and fix any warnings or lints introduced by changes
Applied to files:
.github/workflows/cron-ci.yaml
📚 Learning: 2025-08-09T22:56:24.527Z
Learnt from: jackoconnordev
Repo: RustPython/RustPython PR: 6086
File: benches/microbenchmarks/sort.py:1-3
Timestamp: 2025-08-09T22:56:24.527Z
Learning: In RustPython's microbenchmarks (benches/microbenchmarks/*.py), the variable `ITERATIONS` is intentionally used without being defined in the Python files. It is injected by the cargo bench harness at runtime. This pattern should be maintained for consistency across all microbenchmarks, and F821 lint warnings for undefined `ITERATIONS` are expected and acceptable in this context.
Applied to files:
.github/workflows/cron-ci.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Ensure compilation on various targets
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Run rust tests (windows-2025)
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Run snippets and cpython tests (windows-2025)
- GitHub Check: Check Rust code with clippy
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Check the WASM package and demo
- GitHub Check: Collect regression test data
- GitHub Check: Collect code coverage data
- GitHub Check: Collect benchmark data
- GitHub Check: Collect what is left data
🔇 Additional comments (6)
.github/workflows/cron-ci.yaml (6)
8-10: LGTM!Good addition of the
pull_requesttrigger. This allows testing the workflow changes without waiting for the scheduled run or manual dispatch.
44-48: LGTM!Correct use of conditional to skip the codecov upload during pull request events. This prevents unnecessary uploads and potential issues with secrets access.
64-68: LGTM!Correctly guards the upload step to prevent deploying test data during PR events.
101-105: LGTM!Properly guards the website upload step for PR events.
148-150: LGTM!Good refactor to use the centralized
PYTHON_VERSIONenvironment variable instead of a hardcoded value.
170-174: LGTM!Correctly guards the benchmark data upload for PR events.
youknowone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Overview
This pull request resolves several causes of the cron-ci workflow's continued failures. It briefly includes the following items. You may also refer to the commit messages.
inspect.getargspec(completely removed in 3.11) withinspect.getfullargspectest.libregrtest.runtest(whose structure changed in 3.11) withtest.libregrtest.findtestsThis PR doesn't fully resolve the issue yet, and there are still areas where RustPython's implementation needs further improvement.
Test
You can check the execution results at the link below (private repository workflow run link). It is expected that it hasn't been uploaded to the website yet.
https://github.com/moreal/RustPython/actions/runs/20972165461
Since
2b6e112(#6724), the cron-ci workflow run also in pull request.You can compare it with the recent workflow run results from upstream (RustPython/RustPython).
https://github.com/RustPython/RustPython/actions/runs/20869340999
Summary by CodeRabbit
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.