Skip to content

Conversation

@YashSuthar983
Copy link
Contributor

@YashSuthar983 YashSuthar983 commented Nov 4, 2025

Reverts #6233

@youknowone this workflow failed deeply sorry as i am new to github actions and still in learning phase.
i created a fix which tested on my fork where i used another account to fork my fork so i can make pr to my fork then test it . This works currently.

what wrong in our previous approach is that we made a workflow which dont have any context of pr and dont have PAT so it failed .

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflows to enforce code formatting checks during continuous integration, replacing the previous automatic formatting process. The lint job now verifies code formatting as part of the build pipeline.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Walkthrough

The PR removes the automatic formatting GitHub Actions workflow and instead integrates rustfmt formatting checks into the main CI lint job, shifting from automatic code formatting with commits to explicit formatting verification during continuous integration.

Changes

Cohort / File(s) Summary
Workflow removal
.github/workflows/auto-format.yaml
Entire workflow deleted that previously auto-formatted code and committed changes with [skip ci] on workflow_run completion.
CI lint enhancement
.github/workflows/ci.yaml
Renamed lint step to indicate rustfmt inclusion alongside clippy, added rustfmt to Rust toolchain components, and injected cargo fmt --check step before wasm clippy verification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that removing the auto-format workflow doesn't break existing developer workflows or automation expectations
  • Confirm that cargo fmt --check in the lint job adequately replaces the removed auto-formatting behavior for CI validation
  • Ensure the toolchain component ordering and step sequencing in the CI job are correct

Possibly related PRs

  • Update CI auto-format #6233: Directly modifies the same CI workflows (auto-format.yaml and ci.yaml) with related rustfmt/cargo fmt configuration changes.

Suggested reviewers

  • youknowone

Poem

🐰 The auto-formatter hops away to rest,
No more commits—enforcement is best!
With fmt --check in every lint we run,
Code stays formatted, the CI checks it's done! ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Revert "Update CI auto-format"' directly reflects the main change: reverting a previous CI auto-format update. It is concise, clear, and accurately describes the primary purpose of the PR.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 377151a and 6b39fd2.

📒 Files selected for processing (2)
  • .github/workflows/auto-format.yaml (0 hunks)
  • .github/workflows/ci.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/auto-format.yaml
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-11T05:06:59.971Z
Learning: Applies to **/*.rs : Format Rust code with the default rustfmt style (run `cargo fmt`)
Learnt from: ShaharNaveh
Repo: RustPython/RustPython PR: 5932
File: .github/workflows/comment-commands.yml:18-24
Timestamp: 2025-07-10T10:08:43.330Z
Learning: In GitHub Actions workflows for the RustPython project, the maintainer ShaharNaveh prefers to keep workflows simple and doesn't mind if steps fail when the desired state is already achieved (e.g., user already assigned to an issue). Avoid suggesting complex error handling for edge cases they don't consider problematic.
📚 Learning: 2025-09-11T05:06:59.971Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-11T05:06:59.971Z
Learning: Applies to **/*.rs : Run clippy and fix any warnings or lints introduced by your changes

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-09-11T05:06:59.971Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-11T05:06:59.971Z
Learning: Applies to **/*.rs : Format Rust code with the default rustfmt style (run `cargo fmt`)

Applied to files:

  • .github/workflows/ci.yaml
📚 Learning: 2025-09-11T05:06:59.971Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-11T05:06:59.971Z
Learning: Applies to extra_tests/**/*.py : Use ruff to lint custom Python code

Applied to files:

  • .github/workflows/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). (11)
  • GitHub Check: Run rust tests (windows-latest)
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Check the WASM package and demo
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run tests under miri
  • GitHub Check: Check Rust code with rustfmt and clippy
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Ensure compilation on various targets
  • GitHub Check: Run rust tests (macos-latest)
🔇 Additional comments (1)
.github/workflows/ci.yaml (1)

310-318: LGTM! Clean revert to explicit formatting verification in CI.

The changes appropriately shift from auto-formatting with auto-commits to explicit formatting verification as part of the lint job. The cargo fmt --check step (read-only) is correctly positioned, and the toolchain includes both rustfmt and clippy components as needed. Verification confirms the referenced .github/workflows/auto-format.yaml has been removed and no other workflow files depend on it.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem, let's try again

@youknowone youknowone merged commit 5cad66c into RustPython:main Nov 4, 2025
12 checks passed
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.

2 participants