Skip to content

fix: dynamodb restart#7965

Merged
thrau merged 1 commit intomasterfrom
fix-ddb-reset
Mar 25, 2023
Merged

fix: dynamodb restart#7965
thrau merged 1 commit intomasterfrom
fix-ddb-reset

Conversation

@giograno
Copy link
Member

@giograno giograno commented Mar 24, 2023

This PR fixes the restart of DynamoDB.

I noticed this issue when working to re-enable the cloud pods tests. I likely introduced this regression in #7827.

In a nutshell, we were creating the assets directory in the on_before_state_reset() hook and deleting it when calling the visitor. This PR moves the creation to the server to the on_after_state_reset() hook.

One can simply test it by creating some resources and calling the endpoint with curl -X POST http://localhost:4566/_localstack/state/reset

@giograno giograno added area: persistence Retain state between LocalStack runs aws:dynamodb Amazon DynamoDB labels Mar 24, 2023
@giograno giograno marked this pull request as ready for review March 24, 2023 18:39
@coveralls
Copy link

Coverage Status

Coverage: 81.746%. Remained the same when pulling 7293254 on fix-ddb-reset into 7ae6048 on master.

Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

LGTM!

@thrau thrau merged commit 336218f into master Mar 25, 2023
@alexrashed alexrashed deleted the fix-ddb-reset branch March 27, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: persistence Retain state between LocalStack runs aws:dynamodb Amazon DynamoDB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants