Repository navigation
fix(parser): fix DynamoDB Stream Lambda invocation record model - #8321
leandrodamascena merged 4 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. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8321 +/- ##
========================================
Coverage 96.63% 96.63%
========================================
Files 296 296
Lines 14759 14759
Branches 1243 1243
========================================
Hits 14263 14263
Misses 362 362
Partials 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks for working on this @exg! Approved!
* chore(lint): enable Python 3.10 pyupgrade rules UP006, UP007 and UP035 The ruff target has been py310 since #8321, but the three pyupgrade rules that matter for that target were still ignored. Enable them and apply their fixes: builtin generics instead of typing aliases, PEP 604 unions, and collections.abc imports. Two places keep the old form on purpose: the OpenAPI compat mapping that keys typing aliases to builtins, and the batch alias that unions a string placeholder when Pydantic is not installed. * docs: realign hl_lines after pyupgrade changes in examples Fifty example files lost or gained import lines, which shifted the lines highlighted by the docs. Remap every hl_lines that embeds a changed example so the same statements stay highlighted, and keep the Annotated import in validating_headers.py on one line so its docs annotation reads naturally.



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.