Use correct cursor pattern
What does this MR do and why?
Use correct cursor pattern
This commit fixes cursor for keyset pagination in groups and projects audit event finder
EE: true Changelog: added
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Disable Feature.disable(:read_audit_events_from_new_tables)
- Call audit events API: base_url/api/v4/groups/flightjs/audit_events?pagination=keyset&per_page=1
- Get next page link from response headers
- Enable Feature.enable(:read_audit_events_from_new_tables)
- Call API via next page link
- Check error:
RuntimeError (Incorrect cursor values were given. Missing items: created_at):
To solve this we need to exclude created_at in order_by clause when using keyset pagination.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #493723
Edited by Harsimar Sandhu