fix(parser): fix DynamoDB Stream Lambda invocation record model#8321
fix(parser): fix DynamoDB Stream Lambda invocation record model#8321exg wants to merge 3 commits into
Conversation
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks, and you're right the field is optional.
One thing: I'd make it Optional[str] = Field(default=None, ...). On its own Optional[str] accepts an explicit null but still rejects the field being absent, and AWS tends to just drop these fields rather than send null in some cases. The default covers both. A test for the missing field would round it out, then happy to approve.
The responseContext.functionError field is null if the error did not occur during function execution.
Also add temporary ignores for some upgrade rules, as there are 1017 corresponding errors.
186f42f to
dbdcd73
Compare
Thanks, updated 👍 I noticed that the ruff target version is behind so I bumped it. After the bump ruff reports 2 B905 errors and 1017 errors from ruff upgrade rules. I fixed the former and added temporary ignores for the latter, to avoid adding noise to the PR. The upgrade errors are automatically fixable, so I can easily fix them in a separate commit if you prefer. |
|



Issue number: closes #8322
Summary
The PR fixes an issue in the DynamoDB Stream Lambda Invocation record data model introduced in #7818.
Changes
The responseContext.functionError field of a DynamoDB Stream Lambda Invocation record is null if the error did not occur during function execution.
User experience
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.