Skip to content

fix(idempotency): include sk in error msgs when using composite key #6325

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 2 commits into from
Mar 24, 2025

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #6308

Summary

Changes

This PR updates the DataRecord class so that it optionally accepts a sort_key_attr parameter. This parameter is provided only when using the DynamoDBPersistenceLayer and when using a composite key (pk + sk).

This fixes a bug that prevented the IdempotencyAlreadyInProgressError from constructing the appropriate error message. The error now include both keys in the error message, making it easier for customers to detect idempotent requests or troubleshoot issues.

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner March 21, 2025 17:35
@boring-cyborg boring-cyborg bot added the tests label Mar 21, 2025
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 21, 2025
@github-actions github-actions bot added the bug Something isn't working label Mar 21, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.31%. Comparing base (792f6eb) to head (8029dd9).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6325   +/-   ##
========================================
  Coverage    96.31%   96.31%           
========================================
  Files          242      242           
  Lines        11706    11710    +4     
  Branches       870      871    +1     
========================================
+ Hits         11275    11279    +4     
  Misses         337      337           
  Partials        94       94           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena leandrodamascena merged commit cbd08ec into develop Mar 24, 2025
10 checks passed
@leandrodamascena leandrodamascena deleted the fix/idempotency-sk-message branch March 24, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Incorrect error message for IdempotencyAlreadyInProgressError when sortKeyAttr is in use
2 participants