Closed skapral closed 6 years ago
@yegor256 please, pay attention to this issue
@skapral I'm aware of this problem and will try to fix ASAP. I don't know how, though :) #98 is relevant
@yegor256 thanks for feedback. About the root cause - did I guessed right? Are there any known workarounds?
@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?)
I'll try. However, I'm not a Ruby guy, so it may take a while.
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?
@0crat assign @tedtoer
@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).
@tedtoer resigned from gh:yegor256/0pdd#99
, please stop working.
Oops! Job gh:yegor256/0pdd#99
is not assigned to anyone.
Oops! Job gh:yegor256/0pdd#99
is not assigned to anyone.
Oops! Job gh:yegor256/0pdd#99
is not assigned to anyone.
Oops! Job gh:yegor256/0pdd#99
is not assigned to anyone.
Oops! Job gh:yegor256/0pdd#99
is not assigned to anyone.
@tedtoer resigned from gh:yegor256/0pdd#99
, please stop working.
@tedtoer resigned from gh:yegor256/0pdd#99
, please stop working.
@0crat status
@skapral I think this problem is gone. Can you confirm this?
@0crat out
@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?
@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.
@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.
@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
https://github.com/project-avral/oo-atom/commit/9c5f8238a9ef58a280fced6283858886f27166f5#commitcomment-22772561
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?