Skip to content

Commit f213510

Browse files
authored
Merge branch 'develop' into fix/1303-appsync-batch-invoke
Signed-off-by: Heitor Lessa <lessa@amazon.com>
2 parents 507d854 + 75b1639 commit f213510

File tree

19 files changed

+426
-220
lines changed

19 files changed

+426
-220
lines changed

CHANGELOG.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,87 @@
44
<a name="unreleased"></a>
55
# Unreleased
66

7+
## Documentation
8+
9+
* **install:** make minimum install the default option then extra ([#3834](https://github.com/aws-powertools/powertools-lambda-python/issues/3834))
10+
11+
## Maintenance
12+
13+
14+
15+
<a name="v2.34.1"></a>
16+
## [v2.34.1] - 2024-02-21
17+
## Bug Fixes
18+
19+
* **ci:** inject PR_LABELS env for PR Label automation ([#3819](https://github.com/aws-powertools/powertools-lambda-python/issues/3819))
20+
* **ci:** revert layer version bump write-only back to append ([#3818](https://github.com/aws-powertools/powertools-lambda-python/issues/3818))
21+
* **event-handler:** return dict on missing multi_value_headers ([#3824](https://github.com/aws-powertools/powertools-lambda-python/issues/3824))
22+
* **idempotency:** validate before saving to cache ([#3822](https://github.com/aws-powertools/powertools-lambda-python/issues/3822))
23+
24+
## Maintenance
25+
26+
* version bump
27+
* **deps-dev:** bump ruff from 0.2.1 to 0.2.2 ([#3802](https://github.com/aws-powertools/powertools-lambda-python/issues/3802))
28+
* **deps-dev:** bump the boto-typing group with 2 updates ([#3810](https://github.com/aws-powertools/powertools-lambda-python/issues/3810))
29+
730

831
<a name="v2.34.0"></a>
932
## [v2.34.0] - 2024-02-21
33+
## Bug Fixes
34+
35+
* **ci:** create one layer artifact per region & merge ([#3808](https://github.com/aws-powertools/powertools-lambda-python/issues/3808))
36+
* **event-handler:** multi-value query string and validation of scalar parameters ([#3795](https://github.com/aws-powertools/powertools-lambda-python/issues/3795))
37+
* **event-handler:** swagger schema respects api stage ([#3796](https://github.com/aws-powertools/powertools-lambda-python/issues/3796))
38+
* **event-handler:** handle aliased parameters e.g., Query(alias="categoryType") ([#3766](https://github.com/aws-powertools/powertools-lambda-python/issues/3766))
39+
40+
## Code Refactoring
41+
42+
* **feature-flags:** add intersection tests; structure refinement ([#3775](https://github.com/aws-powertools/powertools-lambda-python/issues/3775))
43+
44+
## Documentation
45+
46+
* **feature_flags:** fix incorrect line markers and envelope name ([#3792](https://github.com/aws-powertools/powertools-lambda-python/issues/3792))
47+
* **home:** update layer version to 62 for package version 2.33.1 ([#3778](https://github.com/aws-powertools/powertools-lambda-python/issues/3778))
48+
* **home:** add note about POWERTOOLS_DEV side effects in CloudWatch Logs ([#3770](https://github.com/aws-powertools/powertools-lambda-python/issues/3770))
49+
* **homepage:** discord flat badge style; remove former devax email ([#3768](https://github.com/aws-powertools/powertools-lambda-python/issues/3768))
50+
* **homepage:** remove leftover announcement banner ([#3783](https://github.com/aws-powertools/powertools-lambda-python/issues/3783))
51+
* **roadmap:** latest roadmap update; use new grid to de-clutter homepage ([#3755](https://github.com/aws-powertools/powertools-lambda-python/issues/3755))
52+
* **we-made-this:** add swagger post ([#3799](https://github.com/aws-powertools/powertools-lambda-python/issues/3799))
53+
* **we-made-this:** add reinvent 2023 session ([#3790](https://github.com/aws-powertools/powertools-lambda-python/issues/3790))
54+
55+
## Features
56+
57+
* **feature_flags:** add intersect actions for conditions ([#3692](https://github.com/aws-powertools/powertools-lambda-python/issues/3692))
58+
1059
## Maintenance
1160

1261
* version bump
62+
* **deps:** bump actions/dependency-review-action from 4.1.2 to 4.1.3 ([#3813](https://github.com/aws-powertools/powertools-lambda-python/issues/3813))
63+
* **deps:** bump actions/dependency-review-action from 4.1.0 to 4.1.2 ([#3800](https://github.com/aws-powertools/powertools-lambda-python/issues/3800))
64+
* **deps:** bump actions/dependency-review-action from 4.0.0 to 4.1.0 ([#3771](https://github.com/aws-powertools/powertools-lambda-python/issues/3771))
65+
* **deps:** bump squidfunk/mkdocs-material from `62d3668` to `43b898a` in /docs ([#3801](https://github.com/aws-powertools/powertools-lambda-python/issues/3801))
66+
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates ([#3764](https://github.com/aws-powertools/powertools-lambda-python/issues/3764))
67+
* **deps:** bump squidfunk/mkdocs-material from `6a72238` to `62d3668` in /docs ([#3756](https://github.com/aws-powertools/powertools-lambda-python/issues/3756))
68+
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 2 updates ([#3814](https://github.com/aws-powertools/powertools-lambda-python/issues/3814))
69+
* **deps:** bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update ([#3784](https://github.com/aws-powertools/powertools-lambda-python/issues/3784))
70+
* **deps-dev:** bump pytest from 8.0.0 to 8.0.1 ([#3812](https://github.com/aws-powertools/powertools-lambda-python/issues/3812))
71+
* **deps-dev:** bump aws-cdk from 2.127.0 to 2.128.0 ([#3776](https://github.com/aws-powertools/powertools-lambda-python/issues/3776))
72+
* **deps-dev:** bump the boto-typing group with 2 updates ([#3797](https://github.com/aws-powertools/powertools-lambda-python/issues/3797))
73+
* **deps-dev:** bump cfn-lint from 0.85.1 to 0.85.2 ([#3786](https://github.com/aws-powertools/powertools-lambda-python/issues/3786))
74+
* **deps-dev:** bump pytest-asyncio from 0.21.1 to 0.23.5 ([#3773](https://github.com/aws-powertools/powertools-lambda-python/issues/3773))
75+
* **deps-dev:** bump aws-cdk-lib from 2.127.0 to 2.128.0 ([#3777](https://github.com/aws-powertools/powertools-lambda-python/issues/3777))
76+
* **deps-dev:** bump sentry-sdk from 1.40.3 to 1.40.4 ([#3765](https://github.com/aws-powertools/powertools-lambda-python/issues/3765))
77+
* **deps-dev:** bump sentry-sdk from 1.40.4 to 1.40.5 ([#3805](https://github.com/aws-powertools/powertools-lambda-python/issues/3805))
78+
* **deps-dev:** bump mkdocs-material from 9.5.9 to 9.5.10 ([#3803](https://github.com/aws-powertools/powertools-lambda-python/issues/3803))
79+
* **deps-dev:** bump types-redis from 4.6.0.20240106 to 4.6.0.20240218 ([#3804](https://github.com/aws-powertools/powertools-lambda-python/issues/3804))
80+
* **deps-dev:** bump the boto-typing group with 1 update ([#3757](https://github.com/aws-powertools/powertools-lambda-python/issues/3757))
81+
* **deps-dev:** bump aws-cdk-lib from 2.126.0 to 2.127.0 ([#3758](https://github.com/aws-powertools/powertools-lambda-python/issues/3758))
82+
* **deps-dev:** bump aws-cdk from 2.126.0 to 2.127.0 ([#3761](https://github.com/aws-powertools/powertools-lambda-python/issues/3761))
83+
* **deps-dev:** bump mkdocs-material from 9.5.8 to 9.5.9 ([#3759](https://github.com/aws-powertools/powertools-lambda-python/issues/3759))
84+
* **deps-dev:** bump sentry-sdk from 1.40.2 to 1.40.3 ([#3750](https://github.com/aws-powertools/powertools-lambda-python/issues/3750))
85+
* **deps-dev:** bump cfn-lint from 0.85.0 to 0.85.1 ([#3749](https://github.com/aws-powertools/powertools-lambda-python/issues/3749))
1386
* **deps-dev:** bump coverage from 7.4.1 to 7.4.2 ([#3811](https://github.com/aws-powertools/powertools-lambda-python/issues/3811))
87+
* **tests:** increase idempotency coverage with nested payload tampering tests ([#3809](https://github.com/aws-powertools/powertools-lambda-python/issues/3809))
1488

1589

1690
<a name="v2.33.1"></a>
@@ -4361,7 +4435,8 @@
43614435
* Merge pull request [#5](https://github.com/aws-powertools/powertools-lambda-python/issues/5) from jfuss/feat/python38
43624436

43634437

4364-
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.34.0...HEAD
4438+
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.34.1...HEAD
4439+
[v2.34.1]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.34.0...v2.34.1
43654440
[v2.34.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.33.1...v2.34.0
43664441
[v2.33.1]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.33.0...v2.33.1
43674442
[v2.33.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.32.0...v2.33.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Exposes version constant to avoid circular dependencies."""
22

3-
VERSION = "2.34.0"
3+
VERSION = "2.34.1"

aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import enum
22
import re
3-
from typing import Any, Dict, List, Optional
3+
from typing import Any, Dict, List, Optional, overload
44

55
from aws_lambda_powertools.utilities.data_classes.common import (
66
BaseRequestContext,
@@ -162,6 +162,22 @@ def stage_variables(self) -> Dict[str, str]:
162162
def request_context(self) -> BaseRequestContext:
163163
return BaseRequestContext(self._data)
164164

165+
@overload
166+
def get_header_value(
167+
self,
168+
name: str,
169+
default_value: str,
170+
case_sensitive: Optional[bool] = False,
171+
) -> str: ...
172+
173+
@overload
174+
def get_header_value(
175+
self,
176+
name: str,
177+
default_value: Optional[str] = None,
178+
case_sensitive: Optional[bool] = False,
179+
) -> Optional[str]: ...
180+
165181
def get_header_value(
166182
self,
167183
name: str,

aws_lambda_powertools/utilities/data_classes/api_gateway_proxy_event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ def resource(self) -> str:
112112

113113
@property
114114
def multi_value_headers(self) -> Dict[str, List[str]]:
115-
return self["multiValueHeaders"]
115+
return self.get("multiValueHeaders") or {}
116116

117117
@property
118-
def multi_value_query_string_parameters(self) -> Optional[Dict[str, List[str]]]:
119-
return self.get("multiValueQueryStringParameters")
118+
def multi_value_query_string_parameters(self) -> Dict[str, List[str]]:
119+
return self.get("multiValueQueryStringParameters") or {}
120120

121121
@property
122122
def resolved_query_string_parameters(self) -> Dict[str, List[str]]:

aws_lambda_powertools/utilities/idempotency/persistence/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Persistence layers supporting idempotency
33
"""
4+
45
import datetime
56
import hashlib
67
import json
@@ -383,9 +384,9 @@ def get_record(self, data: Dict[str, Any]) -> Optional[DataRecord]:
383384

384385
record = self._get_record(idempotency_key=idempotency_key)
385386

387+
self._validate_payload(data_payload=data, stored_data_record=record)
386388
self._save_to_cache(data_record=record)
387389

388-
self._validate_payload(data_payload=data, stored_data_record=record)
389390
return record
390391

391392
@abstractmethod

aws_lambda_powertools/utilities/idempotency/persistence/dynamodb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ def _put_record(self, data_record: DataRecord) -> None:
259259
f"expiry_timestamp: {old_data_record.expiry_timestamp}, "
260260
f"and in_progress_expiry_timestamp: {old_data_record.in_progress_expiry_timestamp}",
261261
)
262-
self._save_to_cache(data_record=old_data_record)
263262

264263
try:
265264
self._validate_payload(data_payload=data_record, stored_data_record=old_data_record)
265+
self._save_to_cache(data_record=old_data_record)
266266
except IdempotencyValidationError as idempotency_validation_error:
267267
raise idempotency_validation_error from exc
268268

0 commit comments

Comments
 (0)