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

Improve DDB bytes encoding #10740

Merged
merged 1 commit into from May 2, 2024
Merged

Improve DDB bytes encoding #10740

merged 1 commit into from May 2, 2024

Conversation

giograno
Copy link
Member

@giograno giograno commented Apr 28, 2024

Motivation

In #8206 we introduced a JSON encoder to handle bytes in DDB entries.
However, while the implementation of BytesEncoder fixed runtime encoding errors, did not achieve full parity with AWS since DynamoDB encodes bytes in Base64.
This PR improves the encoder to fix this gap.
This PR will also address #8952.

Changes

  • Improve the BytesEncoder encoder by encoding bytes in base64;
  • Adding a small unit test;
  • Remove a snapshot skip in test_dynamodb_event_source_mapping to verify the correctness of the implementation.

@giograno giograno added aws:lambda AWS Lambda aws:dynamodb Amazon DynamoDB semver: patch Non-breaking changes which can be included in patch releases labels Apr 28, 2024
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 31m 21s ⏱️ +40s
2 922 tests ±0  2 632 ✅ ±0  290 💤 ±0  0 ❌ ±0 
2 924 runs  ±0  2 632 ✅ ±0  292 💤 ±0  0 ❌ ±0 

Results for commit abcd410. ± Comparison against base commit fcd5927.

@giograno giograno marked this pull request as ready for review April 29, 2024 12:38
Copy link
Member

@viren-nadkarni viren-nadkarni left a comment

Choose a reason for hiding this comment

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

LGTM!

@giograno giograno merged commit 3c06fd4 into master May 2, 2024
39 checks passed
@giograno giograno deleted the ddb-stream-encoding branch May 2, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodb Amazon DynamoDB aws:lambda AWS Lambda 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.

None yet

2 participants