ldap-sync: log silently-dropped Bitu members

[CONTEXT]

_build_target_states enumerates every uid in a GrowthBook Bitu group, resolves a target role, and excludes users who resolve to NO_ACCESS or have no uid->email mapping. Those exclusions had no log output, so a user who was in a GrowthBook group but failed the access gate did not appear in the run logs

Diagnosing "why can't this person access GrowthBook" meant cross-referencing puppet data.yaml and LDAP by hand. The common case after the recent access-gate change is a user in a Bitu group who is not in analytics-privatedata-users and so fails the gate

[CHANGES]

  • Emit a per-user line at each exclusion point: WARNING for a missing email mapping (a data inconsistency), INFO for a NO_ACCESS resolution (an expected state a user clears with an access request). The NO_ACCESS line carries uid, the user's Bitu groups, the resolver rule_number, and a reason string keyed off that rule_number

  • Return TargetResolution with the resolved targets plus exclusion counts, rather than a bare dict. The run summary reports dropped={no_email, no_access} without modeling an exclusion as a first-class plan action, since these users never become members and so are not actions in the apply sense

  • Have report print the eligible/dropped breakdown and relabel "target users (from Bitu)" to "target users (eligible)", since the dropped users are also from Bitu

Bug: T420691

Edited by Ryan Kemper

Merge request reports

Loading