-
Notifications
You must be signed in to change notification settings - Fork 939
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
[platform] Improve CSV mapper behavior to allow correct count and failure tracking (#6844) #6862
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6862 +/- ##
==========================================
+ Coverage 67.48% 67.67% +0.19%
==========================================
Files 561 561
Lines 68734 68741 +7
Branches 5774 5990 +216
==========================================
+ Hits 46384 46522 +138
+ Misses 22350 22219 -131 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to test a complex bundle with errors in it to test the use case but locally tested normal csv mappers and import data works correctly
if event_type == "bundle": | ||
content = base64.b64decode(data["content"]).decode("utf-8") | ||
update = data["update"] if "update" in data else False | ||
self.api.stix2.import_bundle_from_json( | ||
content, update, types, processing_count | ||
imported_items = self.api.stix2.import_bundle_from_json( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import_bundle_from_json returns a list of elements, not a number, and imported_items is initialized at 0. is it a list or a number ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a list, the initialization to 0 must be an empty array. Thanks
...omponents/data/csvMapper/representations/attributes/CsvMapperRepresentationAttributeForm.tsx
Show resolved
Hide resolved
54be42c
to
c30ef34
Compare
I pushed the rebase to master ; conflict in requirements.txt. |
CI is red, we probably need to rebase also the corresponding branch in python-client |
699e9e8
to
6a0bb4c
Compare
See #6844 and OpenCTI-Platform/client-python#629