Skip to content

[backend] delete work when deleting task & verify that work exists in worker (#12815) - #12451

Merged
Jeremy Cloarec (JeremyCloarec) merged 7 commits into
masterfrom
oob/cancelTasks
Oct 16, 2025
Merged

Jeremy Cloarec (JeremyCloarec) merged 7 commits into
masterfrom
oob/cancelTasks

Conversation

@JeremyCloarec

@JeremyCloarec Jeremy Cloarec (JeremyCloarec) commented Sep 17, 2025 •

Copy link
Copy Markdown
Contributor

Proposed changes

  • now also delete associated work when deleting task
  • in worker, verify that bundle work_id is still valid. If work no longer exists, ack the message without processing it

client PR: OpenCTI-Platform/client-python#983

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@JeremyCloarec
Jeremy Cloarec (JeremyCloarec) marked this pull request as ready for review September 17, 2025 16:10
@codecov

codecov Bot commented Sep 17, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.23077% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.52%. Comparing base (a2cdb90) to head (610e05a).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...tform/opencti-graphql/src/domain/backgroundTask.js 12.50% 7 Missing ⚠️
...pencti-platform/opencti-graphql/src/domain/work.js 80.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12451      +/-   ##
==========================================
- Coverage   66.53%   66.52%   -0.01%     
==========================================
  Files         752      752              
  Lines       79741    79817      +76     
  Branches     8557     8563       +6     
==========================================
+ Hits        53056    53102      +46     
- Misses      26685    26715      +30     

☔ 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.

Comment thread opencti-worker/src/worker.py Outdated
Comment thread opencti-platform/opencti-graphql/src/domain/work.js Outdated
Comment thread opencti-platform/opencti-graphql/src/database/redis.ts Outdated
Comment thread opencti-worker/src/worker.py Outdated
Comment thread opencti-platform/opencti-graphql/src/database/redis.ts
@JeremyCloarec Jeremy Cloarec (JeremyCloarec) changed the title [backend] delete work when deleting task & verify that work exists in worker [backend] delete work when deleting task & verify that work exists in worker (#12815) Oct 15, 2025
@JeremyCloarec
Jeremy Cloarec (JeremyCloarec) merged commit 813ba74 into master Oct 16, 2025
11 checks passed
@JeremyCloarec
Jeremy Cloarec (JeremyCloarec) deleted the oob/cancelTasks branch October 16, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team. multi-repository For contribution that requires PR in several repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to cancel the processing of tasks by the worker after the task has been provisioned

4 participants