Skip to content

Conversation

@pinzon
Copy link
Member

@pinzon pinzon commented Oct 31, 2025

Motivation

This PR refactors the policy simulation logic by introducing an abstract IAMPolicySimulator class and a concrete BasicIAMPolicySimulator implementation, enabling a modular and extensible design. The change allows for easy replacement of simulation behavior and is required for some recent enhancements in the Pro version of LocalStack.

Changes

  • New IAMPolicySimulator abstract class.
  • New BasicIAMPolicySimulator class that handles IAM.simulate_principal_policy operation

Tests

Not required since it's a refactoring.

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

LocalStack Community integration with Pro

  2 files  ±    0    2 suites  ±0   52s ⏱️ - 2h 2m 28s
198 tests  - 4 696  194 ✅  - 4 331  4 💤  - 365  0 ❌ ±0 
200 runs   - 4 696  194 ✅  - 4 331  6 💤  - 365  0 ❌ ±0 

Results for commit 7113bd8. ± Comparison against base commit f829e69.

This pull request removes 4696 tests.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Test Results - Preflight, Unit

22 376 tests  ±0   20 626 ✅ ±0   16m 18s ⏱️ +20s
     1 suites ±0    1 750 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 7113bd8. ± Comparison against base commit f829e69.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Test Results (amd64) - Acceptance

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

Results for commit 7113bd8. ± Comparison against base commit f829e69.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Test Results (amd64) - Integration, Bootstrap

  5 files  ±    0    5 suites  ±0   9m 49s ⏱️ - 2h 30m 22s
222 tests  - 5 046  218 ✅  - 4 521   4 💤  - 525  0 ❌ ±0 
228 runs   - 5 046  218 ✅  - 4 521  10 💤  - 525  0 ❌ ±0 

Results for commit 7113bd8. ± Comparison against base commit f829e69.

This pull request removes 5046 tests.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…

♻️ This comment has been updated with latest results.

@pinzon pinzon added aws:iam AWS Identity and Access Management 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 Oct 31, 2025
@pinzon pinzon marked this pull request as ready for review October 31, 2025 21:10
@pinzon pinzon requested a review from dfangl as a code owner October 31, 2025 21:10
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Looks really nice, thanks for refactoring it this way!

@pinzon pinzon merged commit 27697a5 into main Nov 3, 2025
42 checks passed
@pinzon pinzon deleted the unc-61-implement-iam-simulate-principal-policy branch November 3, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws:iam AWS Identity and Access Management 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.

3 participants