Skip to content

chore: implement sane default pagination limit for audit logs #13676

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

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 26, 2024

Also added a comment to protect the "0" limit going forward.

Comment on lines +20 to +23
// A limit of 0 should be interpreted by the SQL query as "null" or
// "no limit". Do not make this value anything besides 0.
Limit: int(parser.PositiveInt32(queryParams, 0, "limit")),
Offset: int(parser.PositiveInt32(queryParams, 0, "offset")),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this comment similar to the -1 one before. Should clear it up going forward 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this comment directly contradict what happens in auditlogs.sql?

@Emyrk Emyrk marked this pull request as ready for review June 26, 2024 14:37
@Emyrk Emyrk requested a review from johnstcn June 26, 2024 20:43
@Emyrk Emyrk force-pushed the stevenmasley/sane_audit_default_limit branch from b89f062 to 28c3872 Compare June 26, 2024 21:13
@Emyrk Emyrk merged commit 3cc86cf into main Jun 28, 2024
28 checks passed
@Emyrk Emyrk deleted the stevenmasley/sane_audit_default_limit branch June 28, 2024 12:38
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants