-
Notifications
You must be signed in to change notification settings - Fork 56
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
[SOAR-18536] palo alto cortex xdr #3027
Changes from all commits
8953966
311aff2
96ba37d
fdd1de0
9d2dfd0
2b513b3
c430c81
944a2e9
1716d2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,15 +117,15 @@ def get_alerts_palo_alto(self, state: dict, start_time: Optional[int], now: int, | |
state[CURRENT_COUNT] = state.get(CURRENT_COUNT, 0) + results_count | ||
|
||
new_alerts, new_alert_hashes, last_alert_time = self._dedupe_and_get_highest_time(results, state) | ||
|
||
is_paginating = state.get(CURRENT_COUNT) < total_count | ||
is_paginating = results_count >= alert_limit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense to me! can we just log the 'results_count' in the pagination log so we can follow this? I'm guessing our results_count will equal the alert_limit each time? Although reading the logic around |
||
|
||
if is_paginating: | ||
self.logger.info(f"Found total alerts={total_count}, limit={alert_limit}, is_paginating={is_paginating}") | ||
self.logger.info( | ||
f"Paginating alerts: Saving state with existing filters: " | ||
f"search_from = {search_from} " | ||
f"search_to = {search_to} " | ||
f"results returned this page = {results_count} " | ||
f"current_count = {state.get(CURRENT_COUNT)} " | ||
f"total_count = {total_count}" | ||
) | ||
|
@@ -138,6 +138,7 @@ def get_alerts_palo_alto(self, state: dict, start_time: Optional[int], now: int, | |
f"Paginating final page of alerts: " | ||
f"search_from = {search_from} " | ||
f"search_to = {search_to} " | ||
f"results returned this page = {results_count} " | ||
f"current_count = {state.get(CURRENT_COUNT)} " | ||
f"total_count = {total_count} " | ||
) | ||
|
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 the issue here just an off by 1 error or something?
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.
we probbaly never get
<
on the finishing statement because on the last page it would equal the total_count. think the comparison was wrong but the new one should still work