josh-project / josh

Just One Single History
https://josh-project.github.io/josh/
MIT License
1.46k stars 55 forks source link

Add endpoint to make it possible to deploy without downtime #67

Open arthurbragaa opened 4 years ago

arthurbragaa commented 4 years ago

In order to deploy josh without downtime, it would be nice to have one endpoint to gracefully shutdown josh and another where it could be checked if the instance is up and running again. This would allow us to make josh highly available.

LMG commented 2 years ago

Something like that would actually be useful, since killing josh will sometimes corrupt the references and the next time we start josh will not work.

christian-schilling commented 2 years ago

What references? Corrupt how? What does "will not work" mean? We should probably make sure josh can recover from such a "corrupted" state rather than trying to make it always shutdown gracefully.

LMG commented 2 years ago

On second thought, it might have been something else. But deleting the references solved the issue.

The error was:

From  [deleted] (none) -> refs/ master error: cannot lock ref 'refs/ master': unable to resolve reference 'refs/josh/upstream/bsw%2Fcentral.git/master'\n ! d9fbc6ad1de7..42b4e2ff280d master -> refs/josh/upstream/bsw%2Fcentral.git/master (unable to update local ref)