bob icon indicating copy to clipboard operation
bob copied to clipboard

Bob deleted src directory after recovery attempt

Open Desperado17 opened this issue 1 year ago • 8 comments

Situation:

  • Software by JN based on 19.1
  • Bob stopped after local disk was full
  • Failed to restart because pickle files were truncated
  • Deleted pickle files so I could go on
  • On the next run, bob deletes the src directory with all my unpushed local changes and checks it out from scratch

Is there a safe way to recover from this situation?+

Desperado17 avatar Jul 08 '22 10:07 Desperado17

Which bob version? Sounds like #470 ?

Are the sources deleted or moved into attic?

rhubert avatar Jul 08 '22 10:07 rhubert

According to my knowledge it's based on 19.1, I cannot say more . No, the src directory was completely destroyed, no attic.

Desperado17 avatar Jul 08 '22 10:07 Desperado17

For more info, it's probably good if Jan contacts integration at JN.

Desperado17 avatar Jul 08 '22 10:07 Desperado17

The truncated pickle file is certainly #470 which has been fixed in Bob 0.21.

On the next run, bob deletes the src directory with all my unpushed local changes and checks it out from scratch

I'm completely puzzled how this could have happened. There has never ever been code in Bob (except for bob clean) which deletes something in the checkout step. If at all, the checkout is moved to the attic next to the workspace. But if you deleted the bob state files then every checkout will, as described in #470, lead to an error message:

bob dev fancy/project -j6 -vvv
...
New SCM checkout 'package' collides with existing file in workspace 'dev/src/someplace/workspace'!

Are you sure you really deleted .bob-state.pickle? If not, Bob might just have switched the branches inline and the changes are still in the git repository. Or did you use bob build and Bob just started every workspace from number 1 and the old workspaces are still around? Can you reproduce the problem, e.g. by just deleting all .bob-* files and retry in a test project?

jkloetzke avatar Jul 09 '22 16:07 jkloetzke

Okay now, this becomes increasingly frustrating. I now had two occurences on the same day where the disk ran full and it ended in an irrecoverable pickle state where I had to delete the whole src directory because otherwise I'd get tons of "collides with existing file in workspace" errors. Do you have any convenience function that remedies this?

Desperado17 avatar Sep 14 '22 11:09 Desperado17

Which Bob version are you using? This bug has been fixed with 0.21.0...

jkloetzke avatar Sep 14 '22 11:09 jkloetzke

Can you name me the commit ids that fix this?

Desperado17 avatar Sep 14 '22 11:09 Desperado17

It's already named in this conversation. You just need to:

  1. follow the link #470 on the comment above:

history

  1. scroll a little bit down

commit

  1. click on the commit...

rhubert avatar Sep 14 '22 12:09 rhubert

Closing because the error was fixed in 0.21.

jkloetzke avatar Nov 09 '22 19:11 jkloetzke