-
Notifications
You must be signed in to change notification settings - Fork 154
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
Paginate continues even if null records are returned #370
Paginate continues even if null records are returned #370
Conversation
…TheJumpCloud/support into SA-2427-Pagination_Improvements
…TheJumpCloud/support into SA-2427-Pagination_Improvements
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.
I think this looks pretty good, it's nice to see some of the reusable code packaged up into a function. Nice work making this look clean and simple.
We still need to update the PublishToPSGallery param to be true in order for the module to release when we merge this in.
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.
Looks good. Awesome work!
Issues
What does this solve?
If a system_group with a null system exists, the previous pagination would end once it came across the null system which would not return the full result set. The fix looks at the requests "x-total-count" to know how many results should be present
Import-JCCommand was having regex issues and that was resolved as well by making adjustments to the regex
Is there anything particularly tricky?
The only way to properly test this is by using an org that has a null system in a system group, which cannot be easily replicated and would have to involve database manipulation to test thoroughly
How should this be tested?
Import the module locally from the current branch
Run Get-JCSystemGroupMember or Get-JCUserGroupMember and validate that it is returning the correct number of results