Skip to content

WIP gerrit FetchUserPerms function

Warren Gifford requested to merge mlw-Gerrit-FetchUserPerms into main

Created by: mollylogue

WIP implementation of gerrit FetchUserPerms function

I figured that this was going to be a sizable amount of code to review, so I wanted to get 👀 on it sooner rather than later. I welcome any thoughts about the approach. I based my implementation off of the info in the doc as well as the gerrit api docs

Outstanding questions:

  • How should we paginate/batch when requesting the list of projects? (Keeping in mind that this will also be the size of the list of projects we request access info for at a time)
  • I've just ignored the "Revision" field of the project access info for now. I'm assuming this will be a part of the sub-repo/branch-based permissions, so I figured we could handle it later on when we tackle the sub-repo perms?

Notable TODOS:

  • caching on the provider is likely something we want to do to avoid a ton of redundant requests. Things to cache include list of all projects and project access info.
  • We'll want some metrics around this function, though I propose we create a separate issue for that and do it in a different PR.

Test plan

  • Full unit test suite to cover various cases
  • Local testing against Gerrit api

Merge request reports

Loading