centraldogma icon indicating copy to clipboard operation
centraldogma copied to clipboard

Provide a way to rollback to certain commit

Open Zeymo opened this issue 5 years ago • 9 comments

when commit has error , we want rollback configuration for a short time , like git revert commentId ... HEAD

Zeymo avatar Oct 29 '18 09:10 Zeymo

Because 'short time' is ambiguous, I think adding an ability to add a revert commit for a certain revision is just enough. A user could choose to send a revert commit of the revert commit, i.e. revert the reversion.

trustin avatar Oct 29 '18 10:10 trustin

Thanks for a good suggestion by the way. I'm curious if you are a LINE employee or just evaluating Central Dogma. Please feel free to hop into our Slack workspace so we could have some chat! :-)

trustin avatar Oct 29 '18 10:10 trustin

Currently, does dogma provide a simple way to revert a file to previous version, i can't find similar api in docs. Is there any other way to achieve it? Thanks!

shelocks avatar Feb 14 '19 09:02 shelocks

There's no such API in Central Dogma, but you can generate a revert commit and push it, i.e. there's no simple way, but we can implement it.

trustin avatar Feb 14 '19 09:02 trustin

There's no such API in Central Dogma, but you can generate a revert commit and push it, i.e. there's no simple way, but we can implement it.

Is this function(revert a file to previous version) developing or released? Thanks

puppylpg avatar Oct 30 '19 04:10 puppylpg

Not under development at the moment, but we hope to add it someday. Are you interested in working on this?

trustin avatar Oct 30 '19 05:10 trustin

Yeah sure. I'm trying to using centraldogma to replace the config part on zookeeper. It'd be my pleasure to make some effort for this project.

puppylpg avatar Oct 30 '19 05:10 puppylpg

Awesome! I think this feature can be implemented basically like this:

  1. Expose a REST operation that allows a user send a revert request.
  2. Create a Command implementation, which is a serializable form of (1).
  3. Implement GitRepository.revert() operation, which will be invoked by CommandExecutor with the properties of (2).

Please feel free to let us know if you need any questions about this.

trustin avatar Oct 30 '19 05:10 trustin

Thanks for your detailed guidance. I'll try to understand the code first quickly, then may disscuss more with you.

puppylpg avatar Oct 30 '19 05:10 puppylpg