Skip to content
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

[backend] improve report cascade delete algorithm to prevent Already deleted error (#6874) #6967

Merged
merged 4 commits into from
May 14, 2024

Conversation

JeremyCloarec
Copy link
Contributor

@JeremyCloarec JeremyCloarec commented May 14, 2024

Proposed changes

  • When cascade deleting in a report, we now check that relationships from or to are not already included in the list of elements to delete. If that is the case, we don't need to delete this relationship because it will be deleted during the deletion of the source element

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 May 14, 2024 10:21
@JeremyCloarec JeremyCloarec modified the milestone: Release 6.2.0 May 14, 2024
Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 67.49%. Comparing base (4ab5d2a) to head (74db82e).
Report is 3 commits behind head on master.

Files Patch % Lines
...ncti-platform/opencti-graphql/src/domain/report.js 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6967      +/-   ##
==========================================
+ Coverage   67.41%   67.49%   +0.07%     
==========================================
  Files         561      561              
  Lines       68510    68540      +30     
  Branches     5712     5808      +96     
==========================================
+ Hits        46186    46259      +73     
+ Misses      22324    22281      -43     

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

@JeremyCloarec JeremyCloarec merged commit 9300520 into master May 14, 2024
5 checks passed
@JeremyCloarec JeremyCloarec deleted the issue/6874 branch May 14, 2024 15:03
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.

None yet

3 participants