Skip to content

WIP Reserve annotation ids via postgres, add collaborationMode#9297

Draft
fm3 wants to merge 28 commits intomasterfrom
m4-reserve-ids
Draft

WIP Reserve annotation ids via postgres, add collaborationMode#9297
fm3 wants to merge 28 commits intomasterfrom
m4-reserve-ids

Conversation

@fm3
Copy link
Copy Markdown
Member

@fm3 fm3 commented Feb 11, 2026

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • abc

TODOs:

  • backend

    • collaborationMode
    • reserveIds + reservedIds routes
    • schema
    • scan in tracingstore (caveat: segment ids in fallback layer case not supported yet)
    • reserve queries for postgres
    • free ids when annotation colalborationMode is switched back away from Concurrent
    • foreign key constraints
    • mutex
    • evolutions
    • test
  • frontend

    • collaborationMode
    • reserve ids

Issues:

  • fixes #

(Please delete unneeded items, merge only when none are left open)

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@fm3 fm3 self-assigned this Feb 11, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 11, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c4c22bea-5b35-4bc4-8677-27ca94f04a98

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch m4-reserve-ids

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fm3
Copy link
Copy Markdown
Member Author

fm3 commented Feb 12, 2026

@philippotto The backend functionality is done, but I could only do rudimentary tests without a corresponding frontend. Summary:

  • changed the othersMayEdit property to collaborationMode, update route is api/annotations/:typ/:id/collaborationMode.
  • new route GET api/annotations/:id/reservedIds?tracingId=x&domain=y (domains are Segment, SegmentGroup, Tree, Node, TreeGroup, BoundingBox)
  • new route POST api/annotations/:id/reserveIds) expects json body:
    domain: AnnotationIdDomain,
    tracingId: String,
    numberOfIdsToReserve: Int,
    idsToRelease: Array[Long]

returns json array of newly reserved ids.

Note that the segment domain is only partially supported. It will fail for annotations with fallback segmentation layer, as discussed previously.

CI currently fails because the frontend types don’t yet understand collaborationMode.

Let me know if you need anything else!

Base automatically changed from live-m4 to master March 5, 2026 08:09
@philippotto
Copy link
Copy Markdown
Member

I rebased (via cherrypick) all of the PR's commits onto the newest master an force-pushed here to resolve the conflicts (necessary because the branch was stacked onto m4). as a backup of the branch, I pushed m4-reserve-ids-merge-backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants