Skip to content

Commit 5bc9c9e

Browse files
authored
Merge branch 'develop' into time2
2 parents 1bc698b + 118f3e9 commit 5bc9c9e

File tree

11 files changed

+188
-97
lines changed

11 files changed

+188
-97
lines changed

.github/workflows/publish_v2_layer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
build-layer:
3333
permissions:
3434
contents: read
35-
runs-on: ubuntu-latest
35+
runs-on: aws-lambda-powertools_ubuntu-latest_4-core
3636
defaults:
3737
run:
3838
working-directory: ./layer

.github/workflows/release.yml

+26-10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ name: Release
2121

2222
env:
2323
BRANCH: develop
24+
ORIGIN: awslabs/aws-lambda-powertools-python
2425

2526
on:
2627
workflow_dispatch:
@@ -48,9 +49,9 @@ on:
4849
jobs:
4950
release:
5051
environment: release
51-
runs-on: ubuntu-latest
52+
runs-on: aws-lambda-powertools_ubuntu-latest_4-core
5253
permissions:
53-
contents: read
54+
contents: write
5455
outputs:
5556
RELEASE_VERSION: ${{ steps.release_version.outputs.RELEASE_VERSION }}
5657
env:
@@ -78,25 +79,40 @@ jobs:
7879
- name: Run all tests, linting and baselines
7980
if: ${{ !inputs.skip_code_quality }}
8081
run: make pr
82+
- name: Git client setup and refresh tip
83+
run: |
84+
git config user.name "Release bot"
85+
git config user.email "[email protected]"
86+
git config pull.rebase true
87+
git config remote.origin.url >&- || git remote add origin https://github.com/"${ORIGIN}" # Git Detached mode (release notes) doesn't have origin
88+
git pull origin "${BRANCH}"
8189
- name: Bump package version
90+
id: versioning
8291
run: poetry version "${RELEASE_VERSION}"
8392
- name: Build python package and wheel
8493
if: ${{ !inputs.skip_pypi }}
8594
run: poetry build
86-
# NOTE: TestPyPi is undergoing a CDN migration https://status.python.org/#
87-
# re-enable for the next release, when degraded status changes
88-
# - name: Upload to PyPi test
89-
# if: ${{ !inputs.skip_pypi }}
90-
# run: make release-test
91-
# env:
92-
# PYPI_USERNAME: __token__
93-
# PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
95+
- name: Upload to PyPi test
96+
if: ${{ !inputs.skip_pypi }}
97+
run: make release-test
98+
env:
99+
PYPI_USERNAME: __token__
100+
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
94101
- name: Upload to PyPi prod
95102
if: ${{ !inputs.skip_pypi }}
96103
run: make release-prod
97104
env:
98105
PYPI_USERNAME: __token__
99106
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
107+
- name: Update version in trunk
108+
if: steps.versioning.outcome == 'success'
109+
run: |
110+
HAS_CHANGE=$(git status --porcelain)
111+
test -z "${HAS_CHANGE}" && echo "Nothing to update" && exit 0
112+
git add pyproject.toml
113+
git commit -m "bump version to ${RELEASE_VERSION}" --no-verify
114+
git pull origin "${BRANCH}" # prevents concurrent branch update failing push
115+
git push origin HEAD:refs/heads/"${BRANCH}"
100116
101117
changelog:
102118
needs: release

.github/workflows/run-e2e-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121

2222
jobs:
2323
run:
24-
runs-on: ubuntu-latest
24+
runs-on: aws-lambda-powertools_ubuntu-latest_8-core
2525
permissions:
2626
id-token: write # needed to request JWT with GitHub's OIDC Token endpoint. docs: https://bit.ly/3MNgQO9
2727
contents: read

CHANGELOG.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
## Bug Fixes
88

99
* **apigateway:** support nested router decorators ([#1709](https://github.com/awslabs/aws-lambda-powertools-python/issues/1709))
10+
* **ci:** increase permission to allow version sync back to repo
11+
* **ci:** disable pre-commit hook download from version bump
12+
* **ci:** setup git client earlier to prevent dirty stash error
1013
* **parameters:** get_secret correctly return SecretBinary value ([#1717](https://github.com/awslabs/aws-lambda-powertools-python/issues/1717))
1114

1215
## Documentation
@@ -15,43 +18,50 @@
1518
* **apigateway:** add all resolvers in testing your code section for accuracy ([#1688](https://github.com/awslabs/aws-lambda-powertools-python/issues/1688))
1619
* **examples:** linting unnecessary whitespace
1720
* **homepage:** update default value for `POWERTOOLS_DEV` ([#1695](https://github.com/awslabs/aws-lambda-powertools-python/issues/1695))
21+
* **idempotency:** add missing Lambda Context; note on thread-safe ([#1732](https://github.com/awslabs/aws-lambda-powertools-python/issues/1732))
22+
* **logger:** update uncaught exception message value
1823

1924
## Features
2025

2126
* **apigateway:** multiple exceptions in exception_handler ([#1707](https://github.com/awslabs/aws-lambda-powertools-python/issues/1707))
2227
* **event_sources:** extract CloudWatch Logs in Kinesis streams ([#1710](https://github.com/awslabs/aws-lambda-powertools-python/issues/1710))
2328
* **logger:** log uncaught exceptions via system's exception hook ([#1727](https://github.com/awslabs/aws-lambda-powertools-python/issues/1727))
29+
* **parser:** export Pydantic.errors through escape hatch ([#1728](https://github.com/awslabs/aws-lambda-powertools-python/issues/1728))
2430
* **parser:** extract CloudWatch Logs in Kinesis streams ([#1726](https://github.com/awslabs/aws-lambda-powertools-python/issues/1726))
2531

2632
## Maintenance
2733

2834
* apigw test event wrongly set with base64
35+
* **ci:** bump hardware for build steps
36+
* **ci:** try bigger hardware for e2e test
37+
* **ci:** uncomment test pypi, fix version bump sync
2938
* **ci:** limit to src only to prevent dependabot failures
3039
* **ci:** use new custom hw for E2E
3140
* **ci:** prevent dependabot updates to trigger E2E
3241
* **ci:** revert custom hw for E2E due to lack of hw
3342
* **deps:** bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 ([#1689](https://github.com/awslabs/aws-lambda-powertools-python/issues/1689))
34-
* **deps-dev:** bump flake8-builtins from 2.0.0 to 2.0.1 ([#1715](https://github.com/awslabs/aws-lambda-powertools-python/issues/1715))
43+
* **deps-dev:** bump mypy-boto3-ssm from 1.25.0 to 1.26.0.post1 ([#1690](https://github.com/awslabs/aws-lambda-powertools-python/issues/1690))
44+
* **deps-dev:** bump mypy-boto3-s3 from 1.25.0 to 1.26.0.post1 ([#1716](https://github.com/awslabs/aws-lambda-powertools-python/issues/1716))
3545
* **deps-dev:** bump mypy-boto3-appconfigdata from 1.25.0 to 1.26.0.post1 ([#1704](https://github.com/awslabs/aws-lambda-powertools-python/issues/1704))
3646
* **deps-dev:** bump mypy-boto3-xray from 1.25.0 to 1.26.0.post1 ([#1703](https://github.com/awslabs/aws-lambda-powertools-python/issues/1703))
3747
* **deps-dev:** bump mypy-boto3-cloudwatch from 1.25.0 to 1.26.0.post1 ([#1714](https://github.com/awslabs/aws-lambda-powertools-python/issues/1714))
3848
* **deps-dev:** bump flake8-bugbear from 22.10.25 to 22.10.27 ([#1665](https://github.com/awslabs/aws-lambda-powertools-python/issues/1665))
39-
* **deps-dev:** bump mypy-boto3-s3 from 1.25.0 to 1.26.0.post1 ([#1716](https://github.com/awslabs/aws-lambda-powertools-python/issues/1716))
49+
* **deps-dev:** bump mypy-boto3-lambda from 1.25.0 to 1.26.0.post1 ([#1705](https://github.com/awslabs/aws-lambda-powertools-python/issues/1705))
4050
* **deps-dev:** bump types-requests from 2.28.11.3 to 2.28.11.4 ([#1701](https://github.com/awslabs/aws-lambda-powertools-python/issues/1701))
4151
* **deps-dev:** bump mypy-boto3-logs from 1.25.0 to 1.26.3 ([#1702](https://github.com/awslabs/aws-lambda-powertools-python/issues/1702))
42-
* **deps-dev:** bump mypy-boto3-lambda from 1.25.0 to 1.26.0.post1 ([#1705](https://github.com/awslabs/aws-lambda-powertools-python/issues/1705))
4352
* **deps-dev:** bump mypy-boto3-xray from 1.26.0.post1 to 1.26.9 ([#1720](https://github.com/awslabs/aws-lambda-powertools-python/issues/1720))
4453
* **deps-dev:** bump mypy-boto3-ssm from 1.26.0.post1 to 1.26.4 ([#1721](https://github.com/awslabs/aws-lambda-powertools-python/issues/1721))
4554
* **deps-dev:** bump mypy-boto3-appconfig from 1.25.0 to 1.26.0.post1 ([#1722](https://github.com/awslabs/aws-lambda-powertools-python/issues/1722))
55+
* **deps-dev:** bump pytest-asyncio from 0.20.1 to 0.20.2 ([#1723](https://github.com/awslabs/aws-lambda-powertools-python/issues/1723))
4656
* **deps-dev:** bump pytest-xdist from 2.5.0 to 3.0.2 ([#1655](https://github.com/awslabs/aws-lambda-powertools-python/issues/1655))
4757
* **deps-dev:** bump mkdocs-material from 8.5.7 to 8.5.9 ([#1697](https://github.com/awslabs/aws-lambda-powertools-python/issues/1697))
4858
* **deps-dev:** bump flake8-comprehensions from 3.10.0 to 3.10.1 ([#1699](https://github.com/awslabs/aws-lambda-powertools-python/issues/1699))
4959
* **deps-dev:** bump types-requests from 2.28.11.2 to 2.28.11.3 ([#1698](https://github.com/awslabs/aws-lambda-powertools-python/issues/1698))
5060
* **deps-dev:** bump pytest-benchmark from 3.4.1 to 4.0.0 ([#1659](https://github.com/awslabs/aws-lambda-powertools-python/issues/1659))
5161
* **deps-dev:** bump mypy-boto3-secretsmanager from 1.25.0 to 1.26.0.post1 ([#1691](https://github.com/awslabs/aws-lambda-powertools-python/issues/1691))
52-
* **deps-dev:** bump pytest-asyncio from 0.20.1 to 0.20.2 ([#1723](https://github.com/awslabs/aws-lambda-powertools-python/issues/1723))
53-
* **deps-dev:** bump mypy-boto3-ssm from 1.25.0 to 1.26.0.post1 ([#1690](https://github.com/awslabs/aws-lambda-powertools-python/issues/1690))
62+
* **deps-dev:** bump flake8-builtins from 2.0.0 to 2.0.1 ([#1715](https://github.com/awslabs/aws-lambda-powertools-python/issues/1715))
5463
* **logger:** overload inject_lambda_context with generics ([#1583](https://github.com/awslabs/aws-lambda-powertools-python/issues/1583))
64+
* **logger:** uncaught exception to use exception value as message
5565

5666

5767
<a name="v2.2.0"></a>

aws_lambda_powertools/logging/logger.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -753,4 +753,4 @@ def _is_internal_frame(frame): # pragma: no cover
753753

754754
def log_uncaught_exception_hook(exc_type, exc_value, exc_traceback, logger: Logger):
755755
"""Callback function for sys.excepthook to use Logger to log uncaught exceptions"""
756-
logger.exception("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)) # pragma: no cover
756+
logger.exception(exc_value, exc_info=(exc_type, exc_value, exc_traceback)) # pragma: no cover

aws_lambda_powertools/utilities/parser/pydantic.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
# to use `from aws_lambda_powertools.utilities.parser.pydantic import <anything>`
77

88
from pydantic import * # noqa: F403,F401
9+
from pydantic.errors import * # noqa: F403,F401

0 commit comments

Comments
 (0)