Releases: aws-powertools/powertools-lambda-python
v1.25.10
Summary
This patch release addresses the following main issues:
- Event Handler: Previously, Lambda handlers decorated with event source data class that also use Event Handler were incompatible
- Event Handler: Raising a
ServiceError
likeNotFound
as part of an exception handler ended up propagating a ServiceError instead of converting into a non-successful response (e.g., 4xx) - Event Source Data Classes: Missing
date
field type annotation in SESEvent to string instead of list, and missing fields likecc
,bcc
,sender
, andreply_to
, anddkim
related fields - Parameters: Previously, customers couldn't easily clear parameters (SSM, Secrets Manager, AppConfig, DynamoDB) cache as part of their automated tests
Changes
🌟 New features and non-breaking changes
- feat(parameters): add clear_cache method for providers (#1194) by @heitorlessa
🐛 Bug and hot fixes
- fix(data-classes): fix SES
date
field typing and add missing fields (#1045) by @michaelbrewer - fix(deps-dev): remove jmespath due to dev deps conflict (#1148) by @sthulb
- fix(deps): ignore boto3 updates until needed (#1151) by @sthulb
- fix(event_handler): allow event source data class events (#1159) by @michaelbrewer
- fix(event_handler): exception_handler to handle ServiceError exceptions (#1160) by @michaelbrewer
🔧 Maintenance
- chore(deps-dev): bump flake8-bugbear from 22.1.11 to 22.4.25 (#1156) by @dependabot
- chore(deps-dev): bump mypy from 0.942 to 0.950 (#1162) by @dependabot
- chore(deps-dev): bump flake8-eradicate from 1.2.0 to 1.2.1 (#1158) by @dependabot
- chore(deps): bump github/codeql-action from 1 to 2 (#1154) by @dependabot
- chore(ci): disable mergify configuration after breaking changes (#1188) by @heitorlessa
- fix(deps): ignore boto3 updates until needed (#1151) by @sthulb
- chore(deps-dev): bump mkdocs-git-revision-date-plugin from 0.3.1 to 0.3.2 (#1146) by @dependabot
- chore(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0 (#1143) by @dependabot
- chore(deps-dev): bump xenon from 0.8.0 to 0.9.0 (#1145) by @dependabot
- chore(deps-dev): bump mypy from 0.931 to 0.942 (#1133) by @dependabot
- fix(deps-dev): remove jmespath due to dev deps conflict (#1148) by @sthulb
This release was made possible by the following contributors:
@dependabot, @dependabot[bot], @heitorlessa, @huonw, @michaelbrewer, and @sthulb
v1.25.9
Summary
Quick patch release to fix jmespath
pip marker to exact Python 3.6 version to address conflict in later versions.
Changes
🐛 Bug and hot fixes
- fix(deps): correct py36 marker for jmespath
This release was made possible by the following contributors:
@dependabot[bot], @heitorlessa and @mergify[bot]
v1.25.8
Summary
This patch release updates jmespath
marker to address a dependency conflict for customers bundling the latest version of boto3
, as part of their Lambda deployment package. Boto's latest version upgraded jmespath
to 1.0 which drops support for Python 3.6.
Changes
📜 Documentation updates
- docs(layer): remove link from clipboard button (#1135) by @heitorlessa
🐛 Bug and hot fixes
- fix(deps): update jmespath marker to support 1.0 and py3.6 (#1139) by @michaelbrewer
🔧 Maintenance
- chore(deps-dev): bump mkdocs-material from 8.2.4 to 8.2.7 (#1131) by @dependabot
- chore(deps-dev): bump pytest from 6.2.5 to 7.0.1 (#1063) by @dependabot
This release was made possible by the following contributors:
@Dunedan, @dependabot, @dependabot[bot], @heitorlessa, @corey-cole, @sthulb, and @michaelbrewer
v1.25.7
Summary
This patch release addresses bugs on Logger, Event Handler REST API, Idempotency, and a static type annotation on middleware factory utility.
We also updated our issues to use the new GitHub Issue Form, including a new Ask a Question, and Static typing mismatch report. The latter addresses an increase of bug reports that are better categorized as static typing mismatch - this will help us understand whether we might be able to support both Mypy and Pyright in the future.
Logger
Thanks to @eliasbrange, customers using clear_state=True
will no longer be affected by custom keys being accidentally removed in subsequent invocations - a regression introduced two releases ago. We improved tests on clear_state functionality.
Idempotency
Thanks to @ojongerius, customers changing the incoming event within the Lambda handler will no longer impact idempotency hash calculation. This was caused by Python's default pass by reference behaviour.
Event Handler REST API
Thanks to @sthuber90, customers receiving API calls that contain whitespace in path parameters - /customer/power tools
- will no longer return 404s. Despite API Gateway correctly decoding whitespace, our regex for safe and unsafe URI chars missed an explicit whitespace.
Middleware Factory
Thanks to @huonw, Mypy customers using --strict
mode will no longer complain about the return type of custom decorators using lambda_handler_decorator. It's a hard problem to solve considering our support for Python 3.6+. Later in the year, we'll look into the value-effort ratio of supporting strict
mode, and how to gradually bring typing_extensions
package across the board.
Huge thanks to new contributors: @sthuber90, @eliasbrange, and @ojongerius
Changes
🐛 Bug and hot fixes
- fix(api_gateway): allow whitespace in routes' path parameter (#1099) by @sthuber90
- fix(middleware_factory): ret type annotation for handler dec (#1066) by @huonw
- fix(logger): clear_state should keep custom key formats (#1095) by @eliasbrange
- fix(idempotency): pass by value on idem key to guard inadvertent mutations (#1090) by @ojongerius
This release was made possible by the following contributors:
@eliasbrange, @heitorlessa, @huonw, @mergify[bot], @ojongerius and @sthuber90
v1.25.6
Summary
This patch release fixes a regression in Logger introduced in 1.25.3 when using clear_state=True
. A fix for customer formatters introduced in 1.25.3 ended up introducing a regression, where standard keys like level
, location
and timestamp
no longer being present when using clear_state=True
for the default Logger formatter.
Thanks to @alexanderluiscampino for a high quality bug report, and @HAK-CODE for confirming the issue two hours ago, we managed to reproduce it quickly, improved our tests, and thus making this emergency release.
Changes
🐛 Bug and hot fixes
- fix(logger): clear_state regression on absent standard keys (#1088) by @heitorlessa
This release was made possible by the following contributors:
@heitorlessa and @mergify[bot]
v1.25.5
Summary
Thanks to @DandyDev, this emergency release fixes a regression on logger utils to clone formatting configuration from Powertools Logger to external Loggers.
Changes
🐛 Bug and hot fixes
This release was made possible by the following contributors:
@heitorlessa, @mergify[bot] and @mploski
v1.25.4
Summary
This is a patch release for those using Logger utils to clone Lambda Powertools Logger configuration to all existing Python Loggers.
Thanks to @DandyDev for spotting a log duplication for external loggers, and for @mploski for helping fix it.
Changes
🐛 Bug and hot fixes
- fix(logger-utils): ensure external loggers doesn't propagate logs on config copy (#1075) by @mploski
This release was made possible by the following contributors:
@heitorlessa, @mploski and Michal Ploski
1.25.3
Summary
This patch release is strictly about customers bringing their own Logging Formatter.
This release ensures that when using Clear State with a custom formatter, all previously added keys will be cleared. It also guarantees that Lambda Context information will no longer be cleared abruptly before logs are printed (also for custom formatters).
There is no code change needed on customers end. We also improved the documentation to clarify the most common use cases on bringing your own formatter, and exceptional cases where you want to replace the entire Powertools Logger Formatter logic.
Huge thanks to @jacobdarrossi for spotting, and @ilias-at-adarma for confirming this bug.
Changes
📜 Documentation updates
- fix(logger): ensure state is cleared for custom formatters (#1072) by @heitorlessa
- docs(plugin): add mermaid to create diagram as code (#1070) by @dreamorosi
🐛 Bug and hot fixes
- fix(logger): ensure state is cleared for custom formatters (#1072) by @heitorlessa
This release was made possible by the following contributors:
v1.25.2
Summary
This patch release addresses two main bugs: 1/ API Gateway Lambda Authorizer data class regex to validate for proxy resources (proxy+), and 2/ metrics to be automatically flushed when a single metric has 100 values.
Next release will focus on two newly identified bugs on Logger (custom formatter, child logger). Subsequently, our bandwidth remains focused on addressing the subpar experiences and operational excellence.
Changes
📜 Documentation updates
- docs(parser): APIGatewayProxyEvent to APIGatewayProxyEventModel (#1061) by @darnley
- fix(event_handler): docs snippets, high-level import CorsConfig (#1019) by @michaelbrewer
🐛 Bug and hot fixes
- fix(metrics): flush upon a single metric 100th data point (#1046) by @knightjoel
- fix(lambda-authorizer): allow proxy resources path in arn (#1051) by @michaelbrewer
- fix(event_handler): docs snippets, high-level import CorsConfig (#1019) by @michaelbrewer
🔧 Maintenance
- chore(deps-dev): bump mkdocs-material from 8.1.9 to 8.2.4 (#1054) by @dependabot
- chore(deps): bump actions/setup-python from 2.3.1 to 3 (#1048) by @dependabot
- chore(deps): bump actions/checkout from 2 to 3 (#1052) by @dependabot
- chore(deps): bump actions/github-script from 5 to 6 (#1023) by @dependabot
- chore(deps): bump fastjsonschema from 2.15.2 to 2.15.3 (#949) by @dependabot
This release was made possible by the following contributors:
@darnley, @dependabot, @dependabot[bot], @heitorlessa, @knightjoel and @michaelbrewer
v1.25.1
Summary
Emergency release to fix a critical bug in the new BatchProcessor feature spotted by Huon Wilson@huonw, and thanks to @michaelbrewer for the quick fix. The issue was exceptions not being consistently cleared between invocations (cold vs warm state).
Changes
🐛 Bug and hot fixes
- fix(batch): bugfix to clear exceptions between executions (#1022) by @michaelbrewer
This release was made possible by the following contributors:
@heitorlessa, @mergify[bot] and @michaelbrewer