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

Duplicate incidents returned when ListIncidentsOptions.Statuses includes multiple items with resolved, and > 25 #496

Open
GavinB-hpe opened this issue Sep 8, 2023 · 0 comments

Comments

@GavinB-hpe
Copy link

GavinB-hpe commented Sep 8, 2023

I have some code that pulls a list of incidents from the API. The code includes setting the ListIncidentsOptions.Statuses field with the statuses I want. What I have observed is that once the number of incidents returned is greater than 25, irrespective of the number fetched per call (I am using pagination, and have experimented with various values for Limit), I start to get duplicates returned. Not everything returned is a duplicate, but it can be the vast majority depending on the exact settings used.

Investigating, I found that the issue is in some way related to use of the "resolved" value. If I set the Statuses option with a range of values including "resolved", I get duplicates. If I have only "triggered" and "acknowledged" all is well. If I have an array with a single value and use "resolved", all is well.

The number of items returned feels correct - however the content is not (I am checking the incident_number and/or ID for uniqueness)

My current workaround is to loop over the statuses I want, and fetch incidents for each one independently, then append. That works as expected.

I have experimented with curl and attempted to duplicate this, but did not manage to do so. curl seems to work fine. Seems to be something in the go code.

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

No branches or pull requests

1 participant