- Notifications
You must be signed in to change notification settings - Fork 513
[jamf_pro] Inventory pagination fix #12231
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
[jamf_pro] Inventory pagination fix #12231
Conversation
🚀 Benchmarks reportTo see the full report comment with |
| Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
💚 Build Succeeded
History
|
|
| Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
ShourieG left a comment
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.
LGTM
| Package jamf_pro - 0.2.1 containing this change is available at https://epr.elastic.co/package/jamf_pro/0.2.1/ |
* Always include the General section of inventory data. * Update the cursor whenever there is new data. * Assume there isn't another page if the current page isn't full. * Correct the name of the `enable_section_content_caching` variable. * Adjust the `page_size` variable description to correct the maximum. * Simplify code to set the inventory filter parameter. This has been manually tested against the live API.
* Always include the General section of inventory data. * Update the cursor whenever there is new data. * Assume there isn't another page if the current page isn't full. * Correct the name of the `enable_section_content_caching` variable. * Adjust the `page_size` variable description to correct the maximum. * Simplify code to set the inventory filter parameter. This has been manually tested against the live API.
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.
Can I clarify that this is "want_more": !(size(body.results) < state.page_size) and the > component of the inequality is a consequence of that? Is there any case that size(body.results) > state.page_size is true? That would seem like a bug in the API.
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, that's the intent.
If the page is not full, stop.
Otherwise continue.
Also continue if it's over-full, but I haven't seen it and I don't expect that to happen.
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.
Thanks




Proposed commit message
Checklist
changelog.ymlfile.Discussion
I ran this against the live endpoint and checked a couple of pagination sequences. Here's some partial data from the logs (not the full results objects), that shows the cursor updates and sequence continuation/end are done correctly:
Expand for the partial request log data
API documentation:
GET /api/v1/computers-inventoryRelated issues