Skip to content

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented Jan 20, 2022

Issue #, if available: 966

Description of changes:

Dictionary/List comprehensions can only contain one unique dict key (last one wins), as expected. Our logic for reporting multiple failures had a bug where we were constructing multiple dictionaries of {"itemIdentifier": message} instead of appending to a list - you can't solve this with a dictionary/list comprehension as the key is always static.

Thanks to @kimberlyamandalu for spotting this critical bug, since our tests somehow were only testing for a single fail record hence why we didn't spot it earlier (nor during review)

Checklist

Breaking change checklist

RFC issue #:

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

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

@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 20, 2022
@github-actions github-actions bot added the bug Something isn't working label Jan 20, 2022
@heitorlessa heitorlessa merged commit 70c35b1 into aws-powertools:develop Jan 20, 2022
@heitorlessa heitorlessa deleted the fix/batch-multiple-failures branch January 20, 2022 06:43
heitorlessa added a commit that referenced this pull request Jan 20, 2022
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  fix(batch): report multiple failures (#967)
  docs(tutorial): fix path to images (#963)
  Update documentation mistake (#961)
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/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant