Clang-format github action cannot find merge base

I often see the clang-format github action fail for my changes for reasons I don’t fully understand.

The latest example is: Use BlockFrequency type in more places (NFC) · llvm/llvm-project@09bf86a · GitHub saying: “Unable to find merge base between 67955033fde0518305d1291edc1ee1cfebb986d0 and 09bf86aad9e656ceee139a568e45b7721e04dbcc”

09bf86aad9e656ceee139a568e45b7721e04dbcc is the branch with my changes and 67955033fde0518305d1291edc1ee1cfebb986d0 seems to be the latest llvm/llvm-project main branch when the script ran. But I don’t see how finding the common ancestor in the main branch can fail here (it would be 5099dc341f7fa9baec160c2991072eb445469d46)

Today I had the same problem with #67684, but not #67613, both of which were based on the same rev of main. Random failure? Timeout?

1 Like

Yeah. I am aware of this and I think it’s an issue with the “changed-files” action I use to compute the files we need to run the formatter on. I want to get rid of it and doing something similar myself - I just haven’t had time to look at it.

If anyone have time to figure out what’s going on there I happy to review. Otherwise i will try to find time on the coming weeks.