Skip to content

Handle NoneType in elastic adapter document_stream#155

Merged
yunzheng merged 1 commit intofox-it:mainfrom
JSCU-CNI:fix/record-nonetype
Jan 8, 2025
Merged

Handle NoneType in elastic adapter document_stream#155
yunzheng merged 1 commit intofox-it:mainfrom
JSCU-CNI:fix/record-nonetype

Conversation

@JSCU-CNI
Copy link
Contributor

@JSCU-CNI JSCU-CNI commented Jan 8, 2025

This PR fixes a Unpackable type <class 'NoneType'> exception for the elastic adapter. This can occur when the record queue gets populated with None instead of a record - which apparently can occur if for example a Dissect plugin does not return any records.

@codecov
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

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

Project coverage is 83.85%. Comparing base (b91f216) to head (a3705a9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
flow/record/adapter/elastic.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #155      +/-   ##
==========================================
- Coverage   83.90%   83.85%   -0.05%     
==========================================
  Files          34       34              
  Lines        3485     3487       +2     
==========================================
  Hits         2924     2924              
- Misses        561      563       +2     
Flag Coverage Δ
unittests 83.85% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@yunzheng
Copy link
Member

yunzheng commented Jan 8, 2025

Do you know which dissect plugin by any chance? It sounds like this should also be fixed there.

@JSCU-CNI
Copy link
Contributor Author

JSCU-CNI commented Jan 8, 2025

We'll look into that in the dissect.target project.

@yunzheng yunzheng merged commit 25d783a into fox-it:main Jan 8, 2025
18 of 20 checks passed
@JSCU-CNI JSCU-CNI deleted the fix/record-nonetype branch January 9, 2025 08:47
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.

2 participants