Skip to content

DynamoDB: Fix empty replicas list in response #12047

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 3 commits into from
Dec 17, 2024
Merged

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Dec 17, 2024

Changes

This PR fixes a regression caused by #11938 which would cause an empty list to be returned when no replicas are configured (reference test run). The behaviour is AWS validated by the tests in the reference run.

Tests

Randomised MA/MR tests: https://app.circleci.com/pipelines/github/localstack/localstack/30321/workflows/ade8da0d-d52a-453e-8c4f-efc418e5d8c3

@viren-nadkarni viren-nadkarni self-assigned this Dec 17, 2024
@viren-nadkarni viren-nadkarni added the semver: patch Non-breaking changes which can be included in patch releases label Dec 17, 2024
Copy link

github-actions bot commented Dec 17, 2024

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   31m 41s ⏱️ - 1h 24m 41s
1 064 tests  - 2 836  1 007 ✅  - 2 581  57 💤  - 250  0 ❌  - 5 
1 066 runs   - 2 836  1 007 ✅  - 2 581  59 💤  - 250  0 ❌  - 5 

Results for commit 8a0668b. ± Comparison against base commit 1dba4f3.

This pull request removes 2836 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.

@viren-nadkarni viren-nadkarni marked this pull request as ready for review December 17, 2024 13:19
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

I'll review as I was, by mistake I think, pinged on the pipeline alert by Alex 😅 LGTM, I'll also merge the PR to unblock the pipeline, hope that's alright!
also: sorry for the having to duplicate all fixes to the DDB v2 provider 😕

@@ -752,7 +752,8 @@ def describe_table(
if replica_region != context.region:
replica_description_list.append(replica_description)

table_description.update({"Replicas": replica_description_list})
if replica_description_list:
table_description.update({"Replicas": replica_description_list})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think we could do table_description["Replicas"] = replica_description_list instead, but it was that way before so let's keep it, only a nit anyway 😄

@bentsku bentsku merged commit 42bec1a into master Dec 17, 2024
35 checks passed
@bentsku bentsku deleted the ddb-sse-regression branch December 17, 2024 23:13
@bentsku bentsku added this to the 4.1 milestone Dec 17, 2024
@bentsku bentsku added the aws:dynamodb Amazon DynamoDB label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodb Amazon DynamoDB 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.

2 participants