-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CS Falcon: fix fetch incidents issues #29898
Conversation
…o cs-falcon-fetch-limit-issue
Co-authored-by: Shelly Tzohar <[email protected]>
6a98d23
to
80fddab
Compare
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.
see my comments.
@@ -1372,7 +1372,7 @@ def get_idp_detections_ids(filter_arg=None, offset: int = 0, limit=INCIDENTS_PER | |||
:rtype ``dict`` | |||
""" | |||
params = { | |||
'sort': 'created_timestamp.asc', | |||
'sort': 'start_time.asc', |
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.
so we are intentionally changing this or did you mean to preserve created_timestamp.asc
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.
this is the IDP endpoint, which supports sorting by the start time and not only by first_behavior
.
Packs/CrowdStrikeFalcon/Integrations/CrowdStrikeFalcon/CrowdStrikeFalcon.py
Outdated
Show resolved
Hide resolved
@@ -2505,6 +2505,21 @@ def migrate_last_run(last_run: dict[str, str] | list[dict]) -> list[dict]: | |||
return [updated_last_run_detections, updated_last_run_incidents, {}] | |||
|
|||
|
|||
def sort_incidents_summaries_by_ids_order(ids_order, full_incidents, id_field): |
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.
maybe change to this because it should work on both?
def sort_incidents_summaries_by_ids_order(ids_order, full_incidents, id_field): | |
def sort_summaries_by_ids_order(ids_order, full_incidents, id_field): |
@@ -2552,7 +2571,7 @@ def fetch_incidents(): | |||
|
|||
detections = filter_incidents_by_duplicates_and_limit(incidents_res=detections, | |||
last_run=current_fetch_info_detections, | |||
fetch_limit=fetch_limit, id_field='name') | |||
fetch_limit=INCIDENTS_PER_FETCH, id_field='name') |
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.
is this intended? why?
relevant to the other places it was changed.
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.
Yes
This is the original issue @daryakoval handled: https://jira-hq.paloaltonetworks.local/browse/XSUP-27448
…rikeFalcon.py Co-authored-by: yuvalbenshalom <[email protected]>
f0c8035
to
8c49437
Compare
8c49437
to
b36970f
Compare
This reverts commit 8832678.
* fixed the parameter that send as a limit * update rn * update test playbook * Update Packs/CrowdStrikeFalcon/ReleaseNotes/1_11_7.md Co-authored-by: Shelly Tzohar <[email protected]> * fixing test playbook * adding sort incidents by the ids order; fix time field issue * rename rn * bump version * added unitest * fix rn * save unitest fix * save format * save unitest fix * update docker * use created timestamp * start_time * RN * Update Packs/CrowdStrikeFalcon/Integrations/CrowdStrikeFalcon/CrowdStrikeFalcon.py Co-authored-by: yuvalbenshalom <[email protected]> * CR * typo * fixes * fixes * fixes * fixes * sort by created * fixes * fixes * simplify * back to offset * fix offset * remove sort * fixes * fix * fixes * updates * fix offset calc * fix * move calculate new offset * fix tests * fix * update limit * fixes --------- Co-authored-by: daryakoval <[email protected]> Co-authored-by: Darya Koval <[email protected]> Co-authored-by: Shelly Tzohar <[email protected]> Co-authored-by: yuvalbenshalom <[email protected]>
related: https://jira-dc.paloaltonetworks.com/browse/XSUP-29234?filter=-1