opencti icon indicating copy to clipboard operation
opencti copied to clipboard

[backend] Trigger enrichment connectors with filters (#5371)

Open SouadHadjiat opened this issue 1 year ago • 1 comments

Proposed changes

  • define connector_trigger_filters
  • filter enrichment connectors

Related issues

  • #5371

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

SouadHadjiat avatar May 27 '24 16:05 SouadHadjiat

Codecov Report

Attention: Patch coverage is 53.68421% with 44 lines in your changes missing coverage. Please review.

Project coverage is 67.43%. Comparing base (5319e8a) to head (e1fd86e).

Files Patch % Lines
...i-platform/opencti-graphql/src/domain/connector.js 10.81% 33 Missing :warning:
...tform/opencti-graphql/src/connector/connector.d.ts 0.00% 5 Missing :warning:
...-platform/opencti-graphql/src/domain/enrichment.js 90.24% 4 Missing :warning:
...atform/opencti-graphql/src/manager/cacheManager.ts 71.42% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7137      +/-   ##
==========================================
- Coverage   67.45%   67.43%   -0.03%     
==========================================
  Files         561      561              
  Lines       69258    69349      +91     
  Branches     5869     5882      +13     
==========================================
+ Hits        46717    46764      +47     
- Misses      22541    22585      +44     

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

codecov[bot] avatar May 31 '24 08:05 codecov[bot]

Just a detail, but maybe the filter box could be moved just a bit down? The 'Add filter' text goes a bit onto the 'Trigger filters' text when we click on the filter box image

JeremyCloarec avatar Jun 13 '24 09:06 JeremyCloarec

What's the expected behavior when auto is set to true in import-external-reference? Does it still take into account the trigger filters?

JeremyCloarec avatar Jun 13 '24 09:06 JeremyCloarec

What's the expected behavior when auto is set to true in import-external-reference? Does it still take into account the trigger filters?

When trigger filters are set, it overrides the "auto" configuration, it will always trigger automatically the connector based on the filters, whether it was set to manual or automatic.

SouadHadjiat avatar Jun 14 '24 08:06 SouadHadjiat

all comments have been fixed, waiting for review & approval

SouadHadjiat avatar Jun 14 '24 15:06 SouadHadjiat