Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove fallback account ID and region for core ARN builder #9528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Nov 1, 2023

Motivation

Over the past few weeks, ARN builders in LocalStack were refactored to use request context account IDs and regions: #9398

This PR wraps up these refactorings.

All the ARN builders use a common function _resource_arn() which falls back to the problematic get_aws_account_id() and aws_stack.get_region() utilities. This PR removes these fallbacks.

Tests

Ext Integration Tests # 3441 🟢

@viren-nadkarni viren-nadkarni self-assigned this Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 5m 3s ⏱️
2 307 tests 2 009 ✔️ 298 💤 0
2 308 runs  2 009 ✔️ 299 💤 0

Results for commit 4951c4e.

♻️ This comment has been updated with latest results.

@viren-nadkarni viren-nadkarni added the semver: patch Non-breaking changes which can be included in patch releases label Nov 1, 2023
@coveralls
Copy link

coveralls commented Nov 7, 2023

Coverage Status

coverage: 84.006% (-0.003%) from 84.009%
when pulling 4951c4e on remove-get-region-arn
into 78999d0 on master.

@viren-nadkarni viren-nadkarni added this to the Playground milestone Nov 10, 2023
@viren-nadkarni viren-nadkarni marked this pull request as ready for review November 13, 2023 12:18
@viren-nadkarni viren-nadkarni requested review from alexrashed and removed request for dominikschubert, joe4dev, macnev2013, dfangl and bentsku November 13, 2023 12:18
@@ -593,7 +593,7 @@ def capitalize_header_name_from_snake_case(header_name: str) -> str:
return "-".join([part.capitalize() for part in header_name.split("-")])


def get_kms_key_arn(kms_key: str, account_id: str, bucket_region: str = None) -> Optional[str]:
def get_kms_key_arn(kms_key: str, account_id: str, bucket_region: str) -> Optional[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

great catch, thanks for fixing this! 🙏

Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Nice! I'm glad to see that these efforts are paying off and everything is coming together! 🧹 🚀

@viren-nadkarni viren-nadkarni merged commit 4b8518e into master Nov 13, 2023
@viren-nadkarni viren-nadkarni deleted the remove-get-region-arn branch November 13, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants