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

Cleanup IAM provider#13856

Merged
pinzon merged 5 commits into
iam/moto-migrationfrom
daniel/unc-299
Feb 26, 2026
Merged

Cleanup IAM provider#13856
pinzon merged 5 commits into
iam/moto-migrationfrom
daniel/unc-299

Conversation

@dfangl

@dfangl dfangl commented Feb 26, 2026

Copy link
Copy Markdown
Member

Motivation

This PR performs some cleanup on the IAM provider. It removes all moto related code, imports, patches and so on.

We also refactor S3 to avoid it's reliance on the IAM moto implementation (which would be incorrect now anyway).

Another thing this PR fixes is the new IAM provider in pro - the iam policies json was missing from the built wheel, so it was missing in pro.
It is now properly included.

There are also some test fixes related to the proper ordering of attached policies.

Changes

  • Remove moto related code from IAM
  • Add the AWS managed policy json to the built wheel
  • Fix some tests
  • Make all datetime objects timezone aware, to avoid avro complaints

Tests

All IAM tests should now pass

Related

Closes UNC-299
Prepares UNC-275

@dfangl dfangl added this to the 2026.03 milestone Feb 26, 2026
@dfangl dfangl requested a review from k-a-il as a code owner February 26, 2026 17:49
@dfangl dfangl added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Feb 26, 2026
@dfangl dfangl requested a review from aidehn as a code owner February 26, 2026 17:49
@dfangl dfangl added 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 26, 2026
@github-actions

Copy link
Copy Markdown

S3 Image Test Results (AMD64 / ARM64)

    2 files  ±0      2 suites  ±0   7m 56s ⏱️ -35s
  573 tests ±0    517 ✅ ±0   56 💤 ±0  0 ❌ ±0 
1 146 runs  ±0  1 034 ✅ ±0  112 💤 ±0  0 ❌ ±0 

Results for commit a36a700. ± Comparison against base commit 2347778.

@pinzon pinzon 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.

LGTM 👍

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.

🥳

Comment on lines +41 to +45
@dataclasses.dataclass
class AccessKeyInfo:
access_key_id: str
secret_access_key: str
session_token: str | None = None

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.

I wonder if we should put this class in models.py

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It’s not really a model of the service, just a typed return value of that method. I think as long as we don’t store it it does not have to be in the models class :)

@dfangl dfangl added the review: merge when ready Signals to the reviewer that a PR can be merged if accepted label Feb 26, 2026
@github-actions

Copy link
Copy Markdown

Test Results - Preflight, Unit

23 070 tests  ±0   21 179 ✅ ±0   6m 54s ⏱️ +33s
     1 suites ±0    1 891 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit a36a700. ± Comparison against base commit 2347778.

@pinzon pinzon merged commit 69158c9 into iam/moto-migration Feb 26, 2026
28 of 30 checks passed
@pinzon pinzon deleted the daniel/unc-299 branch February 26, 2026 18:02
dfangl added a commit that referenced this pull request Mar 4, 2026
dfangl added 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 review: merge when ready Signals to the reviewer that a PR can be merged if accepted semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants