API virtualization/interfaces returns duplicate results when paginating #4926
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Environment
Steps to Reproduce
PAGINATE_COUNT
interfaces./api/virtualization/interfaces/
count
value, in my case was 362/api/virtualization/interfaces/?limit=362&offset=50
(where offset is the value ofPAGINATE_COUNT
).Note: this is how
pynetbox
performs the calls when asking for all objects and how I discovered the bug.Expected Behavior
Get all the 362 interfaces of virtual machines, all unique results.
Observed Behavior
I got only 332 unique results. I got 50 results in the first page and 312 in the second page, for what should have been a total of 362 results, but upon inspection I got only 332 unique results and 30 duplicated results in the second page that were already present in the first API call.
It seems like the results are returned without any sorting hence the unpredicted behaviour.
I've also tried
invalidate all
to clean the cache.I've verified that making a single call with
/api/virtualization/interfaces/?limit=362
returns all 362 results as expected.Retrying with a clean cache I got the exact same 30 duplicates, so it doesn't seem to be totally random or unpredictable.
The text was updated successfully, but these errors were encountered: