BobBuildTool/bob

Bob deleted src directory after recovery attempt

Closed this issue · 9 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?+

Which bob version? Sounds like #470 ?

Are the sources deleted or moved into attic?

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

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

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?

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?

Can you name me the commit ids that fix this?

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...

Closing because the error was fixed in 0.21.