rudder icon indicating copy to clipboard operation
rudder copied to clipboard

Fixes #24779: Groups compliance summary need API pagination

Open clarktsiory opened this issue 1 year ago • 3 comments

https://issues.rudder.io/issues/24779

Some decisions :

  • we don't do server-side sorting and pagination with LDAP which seems overkill here (we only have id, name, category and we still would have to handle it for compliance which is computed in-memory)
  • we do pagination in-memory, without any cache system for now
  • we sort compliance by computing all group compliance first and then sorting naively

The changes :

  • Introducing a QueryFilter case class for the pagination logic
  • Rewriting the group repository method to get the groups, because we want to also get the group category to sort it
  • TODO : optimize sort by compliance : we currently compute both targeted and global compliance on an individual group (horizontally), but we want to only compute the whole column for the sorted one (vertically)

Later improvements

Caching would be ideal but is hard if we don't know when to evict the cache : a change on any group and on policy generation and maybe something else...

clarktsiory avatar Apr 26 '24 14:04 clarktsiory

PR updated with a new commit

clarktsiory avatar Apr 26 '24 14:04 clarktsiory

PR rebased

clarktsiory avatar Sep 10 '24 14:09 clarktsiory

Yes it is still relevant, and it is a UX bug for users with more than 50 groups... It likely depends on when these users will want to upgrade to 8.3. Until now the issue has only been reported once in 8.1

clarktsiory avatar Jan 02 '25 09:01 clarktsiory