Mongo 2: Rollback API#1067
Conversation
337d8c6 to
1578509
Compare
1578509 to
477f794
Compare
9187af1 to
5be429d
Compare
5be429d to
15529b3
Compare
d677718 to
acd9c94
Compare
15529b3 to
9b8862a
Compare
BryonLewis
left a comment
There was a problem hiding this comment.
Much simpler with the re-base. I pulled and tested it and it seems to work properly removing the annotations after the revision number.
The only thing I would comment on is that it's a little unclear that when you give a DELETE with Revision = 5 - it really means DELETE all those revisions that are > 5 and not remove everything including 5. I think as long as it's clear in the documentation that should be okay though.
I'm uneasy with this being a DELETE operation at all, because it's not really (in the REST or CRUD sense). However, since this is a tentative implementation with a long-term aim of a replacement, non-destructive rollback mechanism, it's probably ok. The main difficulty is that the clients will need to change out DELETE calls for a PATCH or POST call later. To the extent that performing a rollback is a state change from the user's POV, rather than a change in the model itself, a POST operation with a verb like |
5918e42 to
494f724
Compare
* Implement rollback * Switch to POST /dive_annotation/rollback
* Implement rollback * Switch to POST /dive_annotation/rollback
* Mongo 1: Server side implementation (#1066) * Poetry fix (#1087) * Poetry fix * Add check for app root * Desktop/sealion multicam (#1024) * init * Allowing multicam to write tracks * inut name change * lint fixes * Updates to multicam * fixing import loading * removing multicamImageFiles change * Fixing various issues * mend * mend * switching to every * Example without fetching metadata (#1088) Co-authored-by: Brandon Davis <brandon.davis@kitware.com> * Server-side implementation * Include description and timestamp * Respond to comments * Switch to checking mongo results * select sub-element * Unmangle indices Co-authored-by: BryonLewis <61746913+BryonLewis@users.noreply.github.com> * Mongo 2: Rollback API (#1067) * Implement rollback * Switch to POST /dive_annotation/rollback * Mongo 3: Utilize new endpoints in celery (#1068) * Utilize new endpoints in celery * Respond to comments * Linting, formatting, and unit tests * respond to comments * Import shutil * Client changes to support revisions (#1070) * Remove broken summary and report generation (#1071) * Add simple sharing test and new indices * Migraction script updates * Add loading state to clone button * label fetch Co-authored-by: BryonLewis <61746913+BryonLewis@users.noreply.github.com>
Reviewer notes
This could have been included in #1066 but it's a new feature, so I made it separate. It provides a read API for rolling back to earlier versions.
Important
This implementation is naive and I don't want to keep it forever. It's a true rollback such that it actually deletes rows from the DB. I would prefer a soft rollback like
git revertwhich replays changes in reverse. But that sounded complicated and I didn't feel like writing it.