Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

IAM: Migrate Groups#13810

Merged
dfangl merged 1 commit into
iam/moto-migrationfrom
cris/unc-269
Feb 24, 2026
Merged

IAM: Migrate Groups#13810
dfangl merged 1 commit into
iam/moto-migrationfrom
cris/unc-269

Conversation

@pinzon

@pinzon pinzon commented Feb 20, 2026

Copy link
Copy Markdown
Member

Motivation

With this PR. We are migrating the Groups resource type from the Moto lib to LocalStack

Changes

  1. localstack-core/localstack/services/iam/models.py
  • Added GroupEntity dataclass to wrap IAM Group with inline policies, managed policy tracking, and
    membership
  • Added GROUPS storage (dict[str, GroupEntity]) to IamStore with CrossRegionAttribute
  1. localstack-core/localstack/services/iam/provider.py
  • Added _group_lock: threading.Lock for thread-safe group operations
  • Added helper methods: _get_group_entity, _generate_group_id, _build_group_arn
  • Implemented 15 group operations:
    • CRUD: create_group, get_group, list_groups, delete_group, update_group
    • Membership: add_user_to_group, remove_user_from_group, list_groups_for_user
    • Inline policies: put_group_policy, get_group_policy, list_group_policies, delete_group_policy
    • Managed policies: attach_group_policy, detach_group_policy, list_attached_group_policies

Tests

  • All tests must pass.

TODO

@pinzon pinzon added semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Feb 20, 2026
@pinzon pinzon added this to the 4.14 milestone Feb 20, 2026
@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

LocalStack Community integration with Pro

  2 files    2 suites   3m 2s ⏱️
518 tests 432 ✅ 71 💤 15 ❌
520 runs  432 ✅ 73 💤 15 ❌

For more details on these failures, see this check.

Results for commit 75184f6.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

Test Results - Preflight, Unit

23 123 tests  ±0   21 252 ✅ ±0   6m 46s ⏱️ +29s
     1 suites ±0    1 871 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 75184f6. ± Comparison against base commit 00594bb.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 1s ⏱️ +2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 75184f6. ± Comparison against base commit 00594bb.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Feb 20, 2026

Copy link
Copy Markdown

Test Results (amd64) - Integration, Bootstrap

  5 files    5 suites   11m 25s ⏱️
542 tests 453 ✅ 71 💤 18 ❌
548 runs  453 ✅ 77 💤 18 ❌

For more details on these failures, see this check.

Results for commit 75184f6.

♻️ This comment has been updated with latest results.

@pinzon pinzon marked this pull request as ready for review February 20, 2026 19:14
@pinzon pinzon removed the request for review from dominikschubert February 20, 2026 21:56
@pinzon pinzon force-pushed the cris/unc-269 branch 2 times, most recently from e275835 to 1b9fef3 Compare February 20, 2026 23:07

@dfangl dfangl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The biggest issue I can see is what happens to a users in a group after rename - the user name would no longer be present. We could store the reference to a user ID, but that would be harder to look up. We can tackle this in a follow up, I created UNC-280 to track this!

@dfangl dfangl merged commit daa78fb into iam/moto-migration Feb 24, 2026
27 of 33 checks passed
@dfangl dfangl deleted the cris/unc-269 branch February 24, 2026 13:44
dfangl pushed a commit that referenced this pull request Feb 26, 2026
dfangl pushed a commit that referenced this pull request Feb 26, 2026
dfangl pushed a commit that referenced this pull request Mar 4, 2026
dfangl pushed a commit that referenced this pull request Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants