opencti icon indicating copy to clipboard operation
opencti copied to clipboard

[backend/frontend] prevent delete CSV mappers if used by CSV ingesters (#6757)

Open labo-flg opened this issue 1 year ago • 2 comments

Proposed changes

  • when user deletes a CSV mapper, find and delete all csv ingesters that uses it.
  • add warning about feeds being deleted as part of the cascade deletion, in the confirm popover
  • fix bad form validation and reset in IngestionCsvCreation

Related issues

  • closes #6757

Checklist

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

labo-flg avatar May 06 '24 10:05 labo-flg

Codecov Report

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

Project coverage is 67.41%. Comparing base (64d087e) to head (08c5fa5).

Files Patch % Lines
...rm/opencti-graphql/src/utils/migration-template.js 0.00% 7 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6891      +/-   ##
==========================================
- Coverage   67.42%   67.41%   -0.01%     
==========================================
  Files         561      561              
  Lines       68510    68533      +23     
  Branches     5713     5713              
==========================================
+ Hits        46191    46200       +9     
- Misses      22319    22333      +14     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 06 '24 11:05 codecov[bot]

Back to draft: need to add a migration script to fix ingesters that might have lost their mapper.

labo-flg avatar May 07 '24 07:05 labo-flg