Support keyset pagination on internal groups json endpoints

What does this MR do and why?

Support keyset pagination on the following JSON group endpoints:

  • /dashboard/groups.json
  • /explore/groups.json

This is necessary to fix the missing pagination bug due to the offset pagination constraints

See !225820 (merged) for full implementation with the frontend changes

References

Related to #591712 (closed)

Screenshots or screen recordings

This is from Use keyset pagination on group list pages (!225820 - merged)

How to set up and validate locally

  1. Set the default page size to 1 on config/initializers/kaminari_config.rb. Run gdk restart to apply.
  2. Make a CURL request to curl -i http://localhost:3000/explore/groups.json?pagination=keyset
    • Extract the cursor: curl -i http://localhost:3000/explore/groups.json?pagination=keyset | grep -i x-next-page
  3. Make another CURL request curl -i http://localhost:3000/explore/groups.json?pagination=keyset&cursor=...

Alternative:

  1. Checkout !225820 (merged)
  2. Set the default page size to 1 on config/initializers/kaminari_config.rb. Run gdk restart to apply.
  3. Enable groups_list_keyset_pagination feature flag.
  4. Go to http://localhost:3000/dashboard/groups
  5. Validate that the pagination works accodingly.

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 #591712 (closed)

Edited by Shane Maglangit

Merge request reports

Loading