Closed bedefrunner closed 6 months ago
"A few hours ago" makes me wonder if there are different Ruff versions running locally vs. in CI, and that it's only appearing now since we shipped some changes to the formatter style today? Is that possible?
Do you get the same results if you specify the version: 0.1.12
in the GitHub Action?
Hi Charlie, thank you for your quick reply.
It was a problem with the versions indeed! Locally we are using Ruff 0.1.12 and the ruff-action uses the latest Ruff version available by default (as stated in their readme). Yesterday Ruff 0.3.0 was shipped so our CI used that version and our PRs started to fail. I changed our local Ruff version to 0.3.0 and now I can see the same error that the CI is showing.
Thank you and sorry for this n00b issue!
Sounds good. Thanks for reporting back.
I recommend you to use a fixed version in CI and bump it at the same time as you bump the local version to ensure CI/local stay in sync.
That's a good idea Micha, will do, thanks!
Hi!
In a repo I'm working with my team we have configured the Github Action ruff-action to run ruff. It's been working great, until a few hours ago when the github action started reporting that a file is not formatted (in all new PRs), but when running ruff locally it says that the file is well formatted.
Here's the ruff-action output in the Github Action:
Running it locally:
Also note that the Github Action output says "180 files already formatted" but when running it locally it says "91 files already formatted", the file count doesn't match.
Here's the content of the
src/manage.py
file:Our
src/project.toml
:Local ruff version:
Thanks!