Skip to content

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

Merged
JeremyCloarec merged 7 commits intomasterfrom
oob/cancelTasks
Oct 16, 2025
Merged

[backend] delete work when deleting task & verify that work exists in worker (#12815)#12451
JeremyCloarec merged 7 commits intomasterfrom
oob/cancelTasks

Conversation

@JeremyCloarec
Copy link
Copy Markdown
Contributor

@JeremyCloarec JeremyCloarec commented Sep 17, 2025

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 JeremyCloarec marked this pull request as ready for review September 17, 2025 16:10
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 17, 2025

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
@JeremyCloarec JeremyCloarec marked this pull request as draft September 19, 2025 13:26
@Kedae Kedae force-pushed the master branch 2 times, most recently from a40e1ff to 6d4e1ed Compare September 24, 2025 17:17
@marieflorescontact marieflorescontact added the filigran team use to identify PR from the Filigran team label Sep 26, 2025
@JeremyCloarec JeremyCloarec added the multi-repository For contribution that requires PR in several repository label Oct 3, 2025
@JeremyCloarec JeremyCloarec marked this pull request as ready for review October 3, 2025 15:06
@SouadHadjiat SouadHadjiat self-requested a review October 7, 2025 08:24
@xfournet xfournet added this to the Release 6.9.0 milestone Oct 9, 2025
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 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 JeremyCloarec merged commit 813ba74 into master Oct 16, 2025
11 checks passed
@JeremyCloarec JeremyCloarec deleted the oob/cancelTasks branch October 16, 2025 08:52
@SamuelHassine SamuelHassine removed this from the Release 6.9.0 milestone Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR 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