Scout: Push and pull conflicts in the same branch caused by github actions

Created on 9 Jun 2020  路  8Comments  路  Source: Clinical-Genomics/scout

The current situation is very annoying:

  • You work on a branch and push the commit changes to remote on github.
  • Github actions (black) reformat and modify the remote
  • in the meanwhile you work some more locally
  • When you push your local changes to remote it tells you that you have to pull first
  • You pull and get a ton of conflicts to fix (with you own branch!!)

This is super annoying and must be fixed.

QualityOfLife

All 8 comments

Agree in principle! So you still see this after the merge of #1948 when using the pre-commit hook? I got the feeling mine relaxed after that, but I have only made a small number of commits to PRs so can't say I know.

Yes, unfortunately 馃槩

The problem is that if there is even a slight change (for instance a new line) between your local and the remote (reformatted by the actions), then you have to merge conflicts in huge chunks of code that you modified on your local.

The thing I don't get is why you would get these big differences in the first place? Assuming line length and black release version is now aligned, the situation you describe is when you touched code that still has an old version of either between the two pushes. Or is there something else at play? One suggestion to solve it if that is the case would be a re-black of the whole code again to reset what has been altered by the old pre-commit hook settings - or perhaps missed the first time around.

In general I don't get so many differences but perhaps it's because I'm doing extensive refactoring in the PR I'm working at. Let's see

Hm, I still think I'm missing a piece of the puzzle. You could get conflicts against your actual own work, if that has changed substantially since last push, but you should only get that in case the black magic actions jumped in. The way we have it rigged now, it is only supposed to happen if the file was not blacked prior to first push? Lets keep this open and collect incidents when this happened perhaps?

Haven't had this problem in a while, so I'm going to close this issue!

There appears to be some kind of loophole that can trigger it; it happened once last week for me. But as long as it is rare it doesn't really matter much. Let's reopen if it returns.

Was this page helpful?
0 / 5 - 0 ratings