Skip to content

fix Annotation deletion#1563

Merged
naknomum merged 15 commits intomainfrom
1562_annotation_deletion_fix
May 8, 2026
Merged

fix Annotation deletion#1563
naknomum merged 15 commits intomainfrom
1562_annotation_deletion_fix

Conversation

@naknomum
Copy link
Copy Markdown
Member

@naknomum naknomum commented Apr 27, 2026

Annotations which have MatchResults and/or Embeddings cannot be deleted without first resolving these foreign-key constrained objects

PR fixes #1562

  • ann.deleteMatchResults() and ann.deleteEmbeddings() created
  • ann.prepareForDeletion() helper method to combine above methods with other pre-delete functionality (e.g. remove from Tasks, etc)
  • insert above methods where needed in servlets and api code
  • jdo tweak to make MatchResultProspects dependent on MatchResults (for deletion cascade)
  • front end changes to progress spinner during deletion

Note: also contains a couple bug fixes, one related, another not so much:

  • numberProspects as property on MatchResult so the we can max out number we actually store on the object; this is to prevent 10s of thousands(!) of prospects being stored in the db, which rendered deletion much too slow and ate up unnecessary db/disk
  • small but powerful SiteSettings bug that accidentally disabled vector/embedding search

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 67.44186% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.61%. Comparing base (af0abd3) to head (0a7d4fe).

Files with missing lines Patch % Lines
frontend/src/pages/BulkImport/BulkImportTask.jsx 50.00% 12 Missing ⚠️
...pages/MatchResultsPage/stores/matchResultsStore.js 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1563      +/-   ##
==========================================
+ Coverage   51.54%   51.61%   +0.07%     
==========================================
  Files         308      308              
  Lines       11952    11976      +24     
  Branches     3833     3736      -97     
==========================================
+ Hits         6161     6182      +21     
- Misses       5510     5514       +4     
+ Partials      281      280       -1     
Flag Coverage Δ
backend 51.61% <67.44%> (+0.07%) ⬆️
frontend 51.61% <67.44%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@naknomum naknomum added this to the 10.10 milestone May 4, 2026
@naknomum naknomum marked this pull request as ready for review May 8, 2026 17:03
@naknomum naknomum merged commit c391d50 into main May 8, 2026
2 checks passed
@naknomum naknomum deleted the 1562_annotation_deletion_fix branch May 8, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

removing an Annotation needs to handle removing associated MatchResults

4 participants