Make group sync additive-only — never remove members#34
Merged
Conversation
- Lambda: remove deletion logic from handle_sync_groups_and_heros, only add missing members. Members added manually via Google Admin UI are preserved. Extra members are logged but not removed. - provision-groups.py: remove implicit helter logic, all groups use explicit memberships from heros.yaml - sync-heros.py: always include helter in mapped groups This prevents accidental mass-removal of group members when heros.yaml is empty or incomplete.
Terraform PlanChanges detected — review required. Plan output |
LLM Plan ReviewRisk: 🟢 LOW Routine Lambda function code update for team_provisioner with source code hash change.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary **Critical fix** — prevents mass-removal of group members. - Lambda `handle_sync_groups_and_heros`: remove deletion logic, only add missing members. Members added manually via Google Admin UI are preserved. Extra members are logged but not removed. - `provision-groups.py`: remove implicit helter logic, all groups use explicit memberships - `sync-heros.py`: always include `helter` in mapped groups ## Why When the registry restructure PR merged, the empty `heros.yaml` (members: []) triggered provisioning which resolved all groups to 0 members. The Lambda then removed existing members from Google groups. ## Test plan - [ ] Merge and apply - [ ] Verify Lambda only adds members, never removes - [ ] Verify extra members in Google groups are preserved and logged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Critical fix — prevents accidental mass-removal of group members.
handle_sync_groups_and_heros: remove deletion logic, only add missing members. Members added manually via Google Admin UI are preserved. Extra members are logged but not removed.provision-groups.py: remove implicit helter logic, all groups use explicit membershipssync-heros.py: always includehelterin mapped groupsWhy
When the registry restructure PR merged, the empty
heros.yaml(members: []) triggered provisioning which resolved all groups to 0 members. The Lambda then removed existing members from Google groups.Test plan