yegor256 / 0pdd

Puzzle Driven Development (PDD) Chatbot Assistant for Your GitHub Repositories
https://www.0pdd.com
MIT License
128 stars 32 forks source link

Could not parse object/Your branch and 'origin/master' have diverged #99

Closed skapral closed 6 years ago

skapral commented 7 years ago

https://github.com/project-avral/oo-atom/commit/9c5f8238a9ef58a280fced6283858886f27166f5#commitcomment-22772561

fatal: Could not parse object '251000d38852773d78985b00a29c6685808bd0ca^' Unknown exit code (128) from command: git-merge-recursive 251000d38852773d78985b00a29c6685808bd0ca^ -- HEAD 251000d38852773d78985b00a29c6685808bd0ca

Your branch and 'origin/master' have diverged, and have 1 and 3 different commits each, respectively. (use "git pull" to merge the remote branch into yours) First, rewinding head to replay your work on top of it...

I suspect that root cause of this issue is that I did some force pushes earlier. I aware that it is a sin, but the main question is: what can I do now to fix this issue?

0crat commented 7 years ago

@yegor256 please, pay attention to this issue

yegor256 commented 7 years ago

@skapral I'm aware of this problem and will try to fix ASAP. I don't know how, though :) #98 is relevant

skapral commented 7 years ago

@yegor256 thanks for feedback. About the root cause - did I guessed right? Are there any known workarounds?

yegor256 commented 7 years ago

@skapral yes, the root cause is your "forced push". The problem is that I don't know how to reproduce this trouble in the test. I tried all possible scenarios: https://github.com/yegor256/0pdd/blob/master/test/test_git_repo.rb They all pass, without issues. Maybe you can contribute?)

skapral commented 7 years ago

I'll try. However, I'm not a Ruby guy, so it may take a while.

skapral commented 7 years ago

Ok. I give up. It is not reproduced for me either. I gave another try to my project and the issue is not reproduced.

Probably we need a button on the project's page on 0pdd.com, like "drop corrupted repo from 0pdd and start anew"? What do you think?

yegor256 commented 6 years ago

@0crat assign @tedtoer

0crat commented 6 years ago

@0crat assign @tedtoer (here)

@yegor256 Job gh:yegor256/0pdd#99 assigned to @tedtoer, please go ahead (policy).

0crat commented 6 years ago

@tedtoer this job was assigned to you 8 days ago. It will be taken away from you after 10 days from start (this is our policy).

0crat commented 6 years ago

@tedtoer resigned from gh:yegor256/0pdd#99, please stop working.

0crat commented 6 years ago

Oops! Job gh:yegor256/0pdd#99 is not assigned to anyone.

0crat commented 6 years ago

Oops! Job gh:yegor256/0pdd#99 is not assigned to anyone.

0crat commented 6 years ago

Oops! Job gh:yegor256/0pdd#99 is not assigned to anyone.

0crat commented 6 years ago

Oops! Job gh:yegor256/0pdd#99 is not assigned to anyone.

0crat commented 6 years ago

Oops! Job gh:yegor256/0pdd#99 is not assigned to anyone.

0crat commented 6 years ago

@tedtoer resigned from gh:yegor256/0pdd#99, please stop working.

0crat commented 6 years ago

Job gh:yegor256/0pdd#99 assigned to @tedtoer. The budget is fixed and it is 30 minutes. Please, read the Policy and go ahead.

0crat commented 6 years ago

@tedtoer resigned from gh:yegor256/0pdd#99, please stop working.

yegor256 commented 6 years ago

@0crat status

0crat commented 6 years ago

@0crat status (here)

@yegor256 This is what I know about this job, as in §32:

0crat commented 6 years ago

The job #99 assigned to @valentjedi/z, here is why. The budget is 30 minutes, see §4. Please, read §8 and §9. If the task is not clear, read this and this.

0crat commented 6 years ago

The user @valentjedi/z resigned from #99, please stop working

0crat commented 6 years ago

Resigned on delay, see §8: -30 points just awarded to @valentjedi/z, total is -120

0crat commented 6 years ago

The job #99 assigned to @prondzyn/z, here is why. The budget is 30 minutes, see §4. Please, read §8 and §9. If the task is not clear, read this and this.

yegor256 commented 6 years ago

@skapral I think this problem is gone. Can you confirm this?

yegor256 commented 6 years ago

@0crat out

0crat commented 6 years ago

@0crat out (here)

@yegor256 @prondzyn/z resigned from #99, since the job is not in scope anymore

0crat commented 6 years ago

@0crat out (here)

@yegor256 The job #99 is now out of scope

skapral commented 6 years ago

@yegor256, I am ok with closing it, I never saw it again later.

But before I did this, what about my alternative proposal?

Probably we need a button on the project's page on 0pdd.com, like "drop corrupted repo from 0pdd and start anew"? What do you think?

Despite the fact that the issue is not reproducible anymore, it is obvious from logs that the fault came from locally cloned Git repo. This button would allow the user to unblock himself this or similar issues.

What do you think - is it worth to outline this idea to a separate bug?

yegor256 commented 6 years ago

@skapral but the problem was solved. Now, no matter how corrupted is the local repo, the next push will restore it back to the normal/current state. It has to happen automatically. If it doesn't happen, it's a bug. To my knowledge, we don't have such bugs now. Maybe they will show up in the future.

skapral commented 6 years ago

@yegor256 Initially, when I observed this bug first time, I clearly remember that this "next push" didn't worked for me. IMO if the local 0pdd clone became corrupted, the most reliable strategy to recover from it is to make 0pdd re-clone the local repo anew, that's why I proposed that button.

But ok, since the issue is not reproduced anymore, let's close it.

yegor256 commented 6 years ago

@skapral a fresh clone is not the only option. Now we are doing this and it seem to work:

https://github.com/yegor256/0pdd/blob/0.29.3/objects/git_repo.rb#L99-L108