-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified annotation versioning #7917
base: master
Are you sure you want to change the base?
Conversation
@philippotto A first rudimentary version seems to work: I can create an annotation on l4_sample, (note: volume buckets won’t load), take the annotation id and skeleton tracing id, and insert them in here (both in uri and in request body):
Then reload and see two skeleton nodes. Adding/Removing layer, volume annotation, proofreading is all still broken. So are the version assertions. But this can be used as a starting point to adapt the frontend:
Note: when switching to and from this branch, I clear the fossildb content with |
The next part of the frontend could be added now: The Restore Older Version flow. The version list view should no longer feature tabs per layer, but instead only one global Also, the revertToVersion update action is no longer layer specific (I guess this may already be covered by philipps changes). It is required that the revertToVersion update action is the only action in its update group (so that it gets its own version number). Not sure if the frontend already does that. Since Philipp is out of office, maybe @MichaelBuessemeyer could have a look at this after #6613 is done? Note that this branch opens fossildb with different column families. I run |
Sure :) |
@MichaelBuessemeyer the next batch of frontend todos has arrived 😇 I have not turned all of them into checkboxes in the description, feel free to do that if you prefer.
|
Regarding the first point:
It seems like @philippotto already implemented this 🥳 But regarding:
The frontend does not know this update action. Maybe it was deprecated and is no longer sent by the frontend? At least cannot find it in the frontend code of this branch and the master as well 🥴. Maybe this is an old update action that is still supported by the backend for compatibility reasons? But on the other side, the version restore view does not have such an entry for legacy purposes. => Maybe the |
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 116 files out of 230 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@fm3 While implementing the new update actions which replaced some routes I came across the following questions:
Why is the Answer: This is only used for more detailed information in the version restore view. For update action
the previous equivalent route was able to update the following annotation properties:
Meaning the route was not only able to update the description and name but also the tags, visibility and viewConfig. Could this also be added to the Answer: The name and description will be versioned as update actions but the |
Some more questions :D
What about sandbox annotations? The current route for this is: Answer: Keep it. & Sandbox is only supported for skeleton annotations. Moreover, the old annotation info fetching route ( TODO [ ]: Always only use the info from the TS route. Maybe the core backend has layers that were deleted already and so on. TODO: micha [ ] Test me with version restore Moreover, is it possible to split up an annotation (its layers) across multiple tracing stores? If that's the case, the frontend needs to call all tracing stores available in the maybe outdated annotation info object from the backend and then merge this information? There can be only one TS at a time for a single WK instance. => So this is not possible |
note to self:
|
Making an annotation's mapping editable (starting proofreading actions should work again. Although, I'd like to ask why the |
Yes, such an extra property is required! It’s called isEditable. For this particular context, both isEditable and isLocked should be set to true. https://github.com/scalableminds/webknossos/blob/master/webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/volume/VolumeUpdateActions.scala#L359 Thanks for having a look at this! |
Oh right, thanks. I got confused between updateActions and dispatchActions here, because the dispatch action does not have fields like |
@@ -91,7 +66,7 @@ class AnnotationController @Inject()( | |||
// For Task and Explorational annotations, id is an annotation id. For CompoundTask, id is a task id. For CompoundProject, id is a project id. For CompoundTaskType, id is a task type id | |||
id: String, | |||
// Timestamp in milliseconds (time at which the request is sent) | |||
timestamp: Long): Action[AnyContent] = sil.UserAwareAction.async { implicit request => | |||
timestamp: Option[Long]): Action[AnyContent] = sil.UserAwareAction.async { implicit request => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to unified annotation versioning, just wanted to do manual get requests. I think this is a fair change. This is used only for user time tracking.
@MichaelBuessemeyer the backend should be ready for review. I’ll continue by building the FossilDB migration, this will occupy me for some time. I’d suggest to first finish the frontend here as far as possible (maybe @philippotto can help with that once he’s back) and then you could start the backend review here. I’ll happily give an introduction in person. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fm3 I think the TimeController also needs to be updated a little to serve the new format of the AnnotationStats for each time tracking entry (instead of an array of stats).
I did not test this so it might be working already, but to me the code in the Controller reads like it needs to be updated. Moreover, the pr does not have any changes for TimeController.scala
also indicating a potential open TODO
You’re right, I’ll add that! I didn’t even remember that the time tracking api includes the stats 😅 |
The newest changes look also good to me :) Thanks for incorporating them. I also did some slight unstructured testing (tried merging annotations, compound tasks & compound projects) |
I did some more testing (went trough WK Testing steps and did want I did not yesterday): While testing I noticed that a single proofreading action results in 3 version entries. Is it maybe possible to reduce this to one version entry? Sorry but I found another little frontend bug:
|
…lowUpdate value in useWillUnmount
we can probably slim this down, but let's do it in a follow up. I created #8345
thanks for spotting this! I fixed this now. please have a look at my latest commit. I tried to clean up how the allowUpdate property is restored. the original problem was that |
…nds/webknossos into unified-annotation-versioning
Awesome. Thanks for fixing this. I can no longer trigger the buggy behaviour 🎉 |
From my side this PR is ready to go ✔️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for all the work you put into this @fm3 @philippotto 🙏
I could not find anything anymore and the code looks good to me.
Maybe a little final quick check from @normanrz regarding the migration guide changes would be useful before merging
@philippotto could you have nother look at the new merge conflicts? For |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migration looks good 👍
…fied-annotation-versioning
done |
Summary
Steps to test:
WK Testing
Note: Since the FossilDB is opened with a new set of column families, switching to and from this branch requires a fresh FossilDB data dir. I use
rm -rf fossildb/data; git co fossildb/data/.gitignore
Migration Testing
TODOs
Backend
// TODO
commentsisCompacted
bool in json, just display those in version log, no applyagglomerateIdsForSegments
needs to support aversion
parameter so that previewing an older version worksFrontend
version
needs to be used when mapping segments to agglomerates inagglomerateIdsForSegments
same for initialize editable mapping -> why? code reads like this is not done and it works. A saved state is simply required for proofreading actionsSyncthese are two different concepts.layerIndependentActions
with backend -> should include only actions which the backend has set to be in a single transaction groupdeleteAnnotationLayer
, which should be removed and replaced with the update actionnewestVersion
sometimes called with emptystring annotationId? looks like this happens in dashboard/during navigation?Migration
SELECT COUNT(*)
? is the pagination buggy? Nope, some annotations have zero layers, they get thrown out by the JOIN. That’s ok.Issues: