pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 3 forks source link

Bot CI fails but local pass #128

Closed Borda closed 2 years ago

Borda commented 2 years ago

Hello, I got a strange case when the bot flags some changes but I can't reproduce it locally... https://results.pre-commit.ci/run/github/178626720/1655427126._Eqtc2wuSl6n_LJqbkMLUg Is there a way how debug this issue? IN fact, the bot says that some files were changed so in this case, it shall commit an update, correct?

this is the ref PR: https://github.com/Lightning-AI/lightning/pull/13312

asottile commented 2 years ago

reproduces locally for me -- the hint is at the bottom: a conflict occurred when applying fixes to the PR. try pulling the upstream branch

here's how I reproduced:

git clone git@github.com:Lightning-AI/lightning
cd lightning
# I got this revision from pre-commit.ci's "mergeable check" -- github produces a merge result between a pull request and the default branch
git fetch origin 2a4f777d0304bab1710b5ff4b40bff93d7b8fc52
git checkout FETCH_HEAD
pre-commit run mdformat --all-files

output:

$ pre-commit run mdformat --all-files
mdformat.................................................................Failed
- hook id: mdformat
- files were modified by this hook

which produced this diff:

$ git diff
diff --git a/README.md b/README.md
index 39b42b0f2..95b28c70b 100644
--- a/README.md
+++ b/README.md
@@ -36,14 +36,13 @@ ______________________________________________________________________

 ###### \*Codecov is > 90%+ but build delays may show less

-----
+______________________________________________________________________

 ## PyTorch Lightning is just organized PyTorch

 Lightning disentangles PyTorch code to decouple the science from the engineering.
 ![PT to PL](docs/source-pytorch/_static/images/general/pl_quick_start_full_compressed.gif)

-
 ## Build AI products with Lightning Apps

 Once you're done building models, publish a paper demo or build a full production end-to-end ML system with Lightning Apps. Lightning Apps remove the cloud infrastructure boilerplate so you can focus on solving the research or business problems. Lightning Apps can run on the Lightning Cloud, your own cluster or a private cloud.

I suspect someone yolo'd a change to the default branch? -- yep can confirm https://github.com/Lightning-AI/lightning/commits/4c666b3ba8ea7fdd3fe9208643cde7fa4d0838ec