Repository navigation
MM-46: Pagination improvements and logging - #2577
Merged
Merged
Conversation
* Pagination improvements and logging The loop also had no page log, and two exits were unsafe. A short page, including a last page of 1 record, was kept but not logged. hasNext: true with a nextSkip that does not advance skipped forever. A body with no records list stopped with no log. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A nextSkip that does not move, or a missing records list, logs a warning and stops with the records already collected. thycotic_search already paged. It did not log each page, and a hasNext value of true with a nextSkip that did not advance would request the same page forever. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A page shorter than 1000, including a last page of 1 record, is kept and logged. A missing records list, a non-object body, or a nextSkip that does not move forward logs a warning and stops with the records already collected. * Move per-page pagination logs to debug level, refine short page condition to count < take, add edge case test * Pagination: fix duplicate param check, refactor for clarity, fix test logging * Address reviewer feedback: JSON error handling, query deduplication, truncated status * update names, and valueError --------- Co-authored-by: Aditya J. <ajaiswal@keepersecurity.com>
craiglurey
approved these changes
Nov 26, 2026
ajaiswal-ks
added a commit
that referenced
this pull request
Nov 27, 2026
* Pagination improvements and logging The loop also had no page log, and two exits were unsafe. A short page, including a last page of 1 record, was kept but not logged. hasNext: true with a nextSkip that does not advance skipped forever. A body with no records list stopped with no log. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A nextSkip that does not move, or a missing records list, logs a warning and stops with the records already collected. thycotic_search already paged. It did not log each page, and a hasNext value of true with a nextSkip that did not advance would request the same page forever. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A page shorter than 1000, including a last page of 1 record, is kept and logged. A missing records list, a non-object body, or a nextSkip that does not move forward logs a warning and stops with the records already collected. * Move per-page pagination logs to debug level, refine short page condition to count < take, add edge case test * Pagination: fix duplicate param check, refactor for clarity, fix test logging * Address reviewer feedback: JSON error handling, query deduplication, truncated status * update names, and valueError --------- Co-authored-by: Aditya J. <ajaiswal@keepersecurity.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The loop also had no page log, and two exits were unsafe. A short page, including a last page of 1 record, was kept but not logged. hasNext: true with a nextSkip that does not advance skipped forever. A body with no records list stopped with no log. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A nextSkip that does not move, or a missing records list, logs a warning and stops with the records already collected.
thycotic_search already paged. It did not log each page, and a hasNext value of true with a nextSkip that did not advance would request the same page forever. Each page now logs skip, take, records, total, hasNext, nextSkip, and the running total. A page shorter than 1000, including a last page of 1 record, is kept and logged. A missing records list, a non-object body, or a nextSkip that does not move forward logs a warning and stops with the records already collected.
Move per-page pagination logs to debug level, refine short page condition to count < take, add edge case test
Pagination: fix duplicate param check, refactor for clarity, fix test logging
Address reviewer feedback: JSON error handling, query deduplication, truncated status
update names, and valueError