Add logic to query Lookup and GitLab
Description
Add logic that queries both Lookup and GitLab and get a list of users that:
- Are cancelled in Lookup but not yet blocked in GitLab
- Are blocked in GitLab but are not cancelled anymore in Lookup
- Are active (unblocked) external users (those that start with
external-
) and haven't accessed GitLab for more than 24 months
Further details
The amount of users in Lookup is much higher than the amount of users in GitLab. It's therefore more efficient to only query all users in GitLab and check the status of those users in Lookup, instead of querying all users in Lookup.
Task list
Acceptance criteria
-
Determine a list of users that are cancelled in Lookup but not yet blocked in GitLab (block) -
Determine a list of users that are blocked in GitLab but are not cancelled anymore in Lookup (unblock) -
Determine a list of users that are active (unblocked) external users (those that start with external-
) and haven't accessed GitLab for more than 24 months -
Interact with the Lookup API via the API Gateway -
Stop doing mutations if it is going to affect more than 5% of users (threshold should be configurable) -
Development and staging should only do a dryrun and not actually apply the change to GitLab -
Tests written to test functionality
Links/references
Edited by Roy Harrington