10000 DynamoDB: Improve global table replicas by viren-nadkarni · Pull Request #8549 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@viren-nadkarni
Copy link
Member
@viren-nadkarni viren-nadkarni commented Jun 22, 2023

This PR:

Because the model definition is changed, this PR will cause loss of DynamoDB resources in existing cloud pods.

Docs: localstack/docs#671

@viren-nadkarni viren-nadkarni self-assigned this Jun 22, 2023
@viren-nadkarni viren-nadkarni added semver: patch Non-breaking changes which can be included in patch releases semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases and removed semver: patch Non-breaking changes which can be included in patch releases labels Jun 23, 2023
@viren-nadkarni viren-nadkarni changed the title DynamoDB: Fix replica responses DynamoDB: Improve global table replicas Jun 23, 2023
finally:
# revert the original context
context.region = original_region
context.request.headers["Authorization"] = original_authorization
Copy link
Member Author

Choose a reason for hiding this comment

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

This restores the original context even if there is an exception in the context block

@viren-nadkarni viren-nadkarni marked this pull request as ready for review June 23, 2023 06:59
@viren-nadkarni viren-nadkarni requested a review from giograno June 23, 2023 07:00
@github-actions
Copy link
github-actions bot commented Jun 23, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 28m 21s ⏱️
2 138 tests 1 817 ✔️ 315 💤 6
2 139 runs  1 817 ✔️ 316 💤 6

For more details on these failures, see this check.

Results for commit 89f4053.

♻️ This comment has been updated with latest results.

@coveralls
Copy link
coveralls commented Jun 23, 2023

Coverage Status

coverage: 82.663% (+0.05%) from 82.618% when pulling fea27e1 on dynamodb-replica into 10eefec on master.

Copy link
Member
@giograno giograno left a comment

Choose a reason for hiding this comment

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

Thanks for tackling and the docs update 👍

GLOBAL_TABLES: Dict[str, Dict] = CrossRegionAttribute(default=dict)

# Maps table name to the region they exist in on DDBLocal (for v.2019 global tables)
TABLE_REGION: Dict[TableName, RegionName] = CrossRegionAttribute(default=dict)
Copy link
Member
@giograno giograno Jun 23, 2023

Choose a reason for hiding this comment

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

nit: we could use the standard collection for type hints.

@viren-nadkarni viren-nadkarni merged commit a5e443b into master Jun 23, 2023
@viren-nadkarni viren-nadkarni deleted the dynamodb-replica branch June 23, 2023 14:12
@dfangl dfangl added this to the 2.2 milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

bug: DynamoDB DescribeTable treats the queried table as a replica

5 participants

0