Skip to content
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

Fix deletion of file content on snapshot error #7898

Merged
merged 1 commit into from Mar 17, 2023

Conversation

dominikschubert
Copy link
Member

When updating or creating new snapshots, an error when serializing the new snapshot previously lead to the complete removal of the file's content.

By moving truncate to after the JSON serialization, an error here will now simply leave the old state as it was instead of leaving behind an empty file.

@dominikschubert dominikschubert self-assigned this Mar 17, 2023
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests March 17, 2023 16:02 — with GitHub Actions Inactive
Copy link
Member

@steffyP steffyP left a comment

Choose a reason for hiding this comment

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

Great change 😄 🙌 This was bothering us for a while, thanks for tackling this issue! 🙏 🚀

@coveralls
Copy link

Coverage Status

Coverage: 85.105% (-0.02%) from 85.122% when pulling 74c44e1 on fix_snapshot-empty-file into 92dca7d on master.

@dominikschubert dominikschubert merged commit f771a97 into master Mar 17, 2023
8 checks passed
@dominikschubert dominikschubert deleted the fix_snapshot-empty-file branch March 17, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants