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] add validation mode to askJobImport (#6728) #9249

Merged
merged 9 commits into from
Dec 17, 2024

Conversation

JeremyCloarec
Copy link
Contributor

@JeremyCloarec JeremyCloarec commented Dec 5, 2024

Proposed changes

  • add background task handling
  • add validation mode to askJobImport
  • add config for automatic import validation mode
  • handle draft validation mode in import csv connector
  • changed reindex script to static instead of dynamic
  • fix handling of draft_context in user

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

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 58.73016% with 26 lines in your changes missing coverage. Please review.

Project coverage is 66.05%. Comparing base (913e1a7) to head (9bdce14).
Report is 25 commits behind head on release/6.5.0.

Files with missing lines Patch % Lines
...hql/src/connector/importCsv/importCsv-connector.ts 6.25% 15 Missing ⚠️
...latform/opencti-graphql/src/manager/taskManager.js 73.91% 6 Missing ⚠️
...pencti-platform/opencti-graphql/src/domain/file.js 0.00% 2 Missing ⚠️
...pencti-graphql/src/domain/backgroundTask-common.js 0.00% 1 Missing ⚠️
...tform/opencti-graphql/src/domain/backgroundTask.js 0.00% 1 Missing ⚠️
...ti-platform/opencti-graphql/src/http/httpServer.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           release/6.5.0    #9249      +/-   ##
=================================================
+ Coverage          65.21%   66.05%   +0.83%     
=================================================
  Files                626      626              
  Lines              59892    60366     +474     
  Branches            6688     7386     +698     
=================================================
+ Hits               39059    39873     +814     
+ Misses             20833    20493     -340     

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

@labo-flg labo-flg added the filigran team use to identify PR from the Filigran team label Dec 6, 2024
@JeremyCloarec JeremyCloarec changed the title Issue/6728 chunk6 [backend] add validation mode to askJobImport (#6577) Dec 9, 2024
@JeremyCloarec JeremyCloarec changed the title [backend] add validation mode to askJobImport (#6577) [backend] add validation mode to askJobImport (#6728) Dec 9, 2024
@JeremyCloarec JeremyCloarec marked this pull request as ready for review December 9, 2024 15:00
@@ -8625,7 +8625,7 @@ type Mutation {
deleteImport(fileName: String): ID
uploadImport(file: Upload!, fileMarkings: [String]): File
uploadPending(file: Upload!, entityId: String, labels: [String], errorOnExisting: Boolean, refreshEntity: Boolean): File
askJobImport(fileName: ID!, connectorId: String, configuration: String, bypassEntityId: String, bypassValidation: Boolean): File
askJobImport(fileName: ID!, connectorId: String, configuration: String, bypassEntityId: String, bypassValidation: Boolean, validationMode: String): File
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we shouldn't have an enum here instead of String ? so it can either be workbench or draft, not any string.

@JeremyCloarec JeremyCloarec merged commit 5a6c1cc into release/6.5.0 Dec 17, 2024
5 checks passed
@JeremyCloarec JeremyCloarec deleted the issue/6728-chunk6 branch December 17, 2024 13:55
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants