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

Skip to content

Add fallback partition config option for ARN partition rewriter #9482

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 1 commit into from
Oct 27, 2023

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Oct 26, 2023

Motivation

The ARN partition rewriter depends on the deprecated environment config variable DEFAULT_REGION. It uses this to determine which partition to use as a fallback.

This is preventing us from removing the DEFAULT_REGION config option with the upcoming major release.

Implementation

This PR introduces a new config option ARN_PARTITION_FALLBACK which can be used to set which partition to use as fallback. It defaults to aws, which is identical to old behaviour where it would be determined from the us-east-1 region.

The DEFAULT_REGION config option will no longer have any effect on the rewriter.

Acceptance of this PR will entail an update to enterprise image build steps.

Tests

Slightly tweaks existing tests to assert the new behaviour.

@viren-nadkarni viren-nadkarni self-assigned this Oct 26, 2023
@viren-nadkarni viren-nadkarni added semver: patch Non-breaking changes which can be included in patch releases and removed semver: patch Non-breaking changes which can be included in patch releases labels Oct 26, 2023
@viren-nadkarni viren-nadkarni force-pushed the arn-part-rewrite-fallback branch from a5894b6 to ece27e4 Compare October 26, 2023 13:23
@viren-nadkarni viren-nadkarni added the semver: major Breaking changes which can be included in a major release only label Oct 26, 2023
@localstack-bot
Copy link
Contributor

Currently, only minor and patch changes are allowed on master. Your PR labels (semver: major) indicate that it cannot be merged into the master at this time.

@viren-nadkarni viren-nadkarni changed the base branch from master to release/v3.0 October 26, 2023 13:24
@viren-nadkarni viren-nadkarni force-pushed the arn-part-rewrite-fallback branch from ece27e4 to 0a317eb Compare October 26, 2023 13:26
@coveralls
Copy link

coveralls commented Oct 26, 2023

Coverage Status

coverage: 83.67% (-0.007%) from 83.677% when pulling 54d03f9 on arn-part-rewrite-fallback into 85abf31 on release/v3.0.

@github-actions
Copy link

github-actions bot commented Oct 26, 2023

LocalStack Community integration with Pro

       2 files  ±0         2 suites  ±0   1h 10m 42s ⏱️ +31s
2 287 tests ±0  1 708 ✔️ ±0  579 💤 ±0  0 ±0 
2 288 runs  ±0  1 708 ✔️ ±0  580 💤 ±0  0 ±0 

Results for commit 54d03f9. ± Comparison against base commit 85abf31.

♻️ This comment has been updated with latest results.

@viren-nadkarni viren-nadkarni marked this pull request as ready for review October 26, 2023 16:43
@viren-nadkarni viren-nadkarni requested a review from thrau as a code owner October 26, 2023 16:43
@viren-nadkarni viren-nadkarni changed the title Allow fallback partition to be set for ARN partition rewriter Add fallback partition config option for ARN partition rewriter Oct 26, 2023
@viren-nadkarni viren-nadkarni force-pushed the arn-part-rewrite-fallback branch from 0a317eb to 451a0b2 Compare October 27, 2023 07:03
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.

Thanks! The code is nice and clean! Thanks for addressing this in order to finally be able to remove the DEFAULT_REGION. 🚀 🧹

@viren-nadkarni viren-nadkarni merged commit 03064dc into release/v3.0 Oct 27, 2023
@viren-nadkarni viren-nadkarni deleted the arn-part-rewrite-fallback branch October 27, 2023 07:53
@alexrashed alexrashed mentioned this pull request Oct 27, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: major Breaking changes which can be included in a major release only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants