Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump aws-lambda-powertools from 1.31.1 to 2.5.0 in /lambda-powertools-feature-flags/app #1474

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 22, 2022

Bumps aws-lambda-powertools from 1.31.1 to 2.5.0.

Release notes

Sourced from aws-lambda-powertools's releases.

v2.5.0

Summary

This release improves logging incoming events that might be wrapped in common containers such as Event Source Data Classes, Pydantic/Parser BaseModels, and Dataclasses.

Also we addressed an issue when a header is set explicit to None.

Big thanks to @​jasmarc for the bug report!

Example:

import json
from aws_lambda_powertools.event_handler import (
APIGatewayRestResolver,
Response,
)
app = APIGatewayRestResolver()
@​app.get("/none")
def hello():
headers = {"This-Header-Will-Be-Omitted": None}
response = {"hello": "world"}
return Response(body=json.dumps(response), headers=headers, status_code=200)
def lambda_handler(event, context):
return app.resolve(event, context)

Changes

🌟New features and non-breaking changes

📜 Documentation updates

  • docs(validation): fix broken link; enrich built-in jmespath links (#1777) by @​heitorlessa
  • docs(idempotency): fix, improve, and increase visibility for batch integration (#1776) by @​heitorlessa

🐛 Bug and hot fixes

🔧 Maintenance

... (truncated)

Changelog

Sourced from aws-lambda-powertools's changelog.

Unreleased

Bug Fixes

  • event_handlers: omit explicit None HTTP header values (#1793)

Documentation

  • idempotency: fix, improve, and increase visibility for batch integration (#1776)
  • validation: fix broken link; enrich built-in jmespath links (#1777)

Features

  • logger: unwrap event from common models if asked to log (#1778)

Maintenance

  • common: reusable function to extract event from models
  • deps: bump certifi from 2022.9.24 to 2022.12.7 (#1768)
  • deps: bump zgosalvez/github-actions-ensure-sha-pinned-actions from 1.4.0 to 2.0.1 (#1752)
  • deps: bump zgosalvez/github-actions-ensure-sha-pinned-actions from 1.3.0 to 1.4.0 (#1749)
  • deps-dev: bump aws-cdk-lib from 2.53.0 to 2.54.0 (#1764)
  • deps-dev: bump mypy-boto3-cloudwatch from 1.26.0.post1 to 1.26.17 (#1753)
  • deps-dev: bump pytest-asyncio from 0.20.2 to 0.20.3 (#1767)
  • deps-dev: bump isort from 5.10.1 to 5.11.2 (#1782)
  • deps-dev: bump mypy-boto3-dynamodb from 1.26.13.post16 to 1.26.24 (#1765)
  • deps-dev: bump mypy-boto3-logs from 1.26.17 to 1.26.27 (#1775)
  • deps-dev: bump mypy-boto3-cloudwatch from 1.26.17 to 1.26.30 (#1785)
  • deps-dev: bump flake8-bugbear from 22.10.27 to 22.12.6 (#1760)
  • deps-dev: bump filelock from 3.8.0 to 3.8.2 (#1759)
  • deps-dev: bump pytest-xdist from 3.0.2 to 3.1.0 (#1758)
  • deps-dev: bump mkdocs-material from 8.5.10 to 8.5.11 (#1756)
  • deps-dev: bump importlib-metadata from 4.13.0 to 5.1.0 (#1750)
  • deps-dev: bump aws-cdk-lib from 2.54.0 to 2.55.1 (#1787)
  • deps-dev: bump flake8-black from 0.3.3 to 0.3.5 (#1738)
  • deps-dev: bump isort from 5.11.2 to 5.11.3 (#1788)
  • tests: move shared_functions to unit tests

[v2.4.0] - 2022-11-24

Bug Fixes

  • ci: use gh-pages env as official docs are wrong
  • ci: api docs path

... (truncated)

Upgrade guide

Sourced from aws-lambda-powertools's upgrade guide.


title: Upgrade guide description: Guide to update between major Powertools versions

Migrate to v2 from v1

We've made minimal breaking changes to make your transition to v2 as smooth as possible.

Quick summary

Area Change Code change required IAM Permissions change required
Batch Removed legacy SQS batch processor in favour of BatchProcessor. Yes -
Environment variables Removed legacy POWERTOOLS_EVENT_HANDLER_DEBUG in favour of POWERTOOLS_DEV{target="_blank"}. - -
Event Handler Updated headers response format due to multi-value headers and cookie support{target="_blank"}. Tests only -
Event Source Data Classes Replaced DynamoDBStreamEvent AttributeValue with native Python types. Yes -
Feature Flags / Parameters Updated AppConfig API calls due to GetConfiguration API deprecation. - Yes
Idempotency Updated partition key to include fully qualified function/method names. - -

First Steps

!!! note "All dependencies are optional now. Tracer{target="_blank"}, Validation{target="_blank"}, and Parser{target="_blank"} now require additional dependencies."

Before you start, we suggest making a copy of your current working project or create a new branch with git.

  1. Upgrade Python to at least v3.7
  2. Ensure you have the latest version via Lambda Layer or PyPi{target="_blank"}.
  3. Review the following sections to confirm whether they affect your code

Legacy SQS Batch Processor

We removed the deprecated PartialSQSProcessor class and sqs_batch_processor decorator.

You can migrate to BatchProcessor with the following changes:

  1. If you use sqs_batch_decorator, change to batch_processor decorator
  2. If you use PartialSQSProcessor, change to BatchProcessor
  3. Enable ReportBatchItemFailures in your Lambda Event Source{target="_blank"}
  4. Change your Lambda Handler to return the new response format

=== "[Before] Decorator"

 ```python hl_lines="1 6"
 from aws_lambda_powertools.utilities.batch import sqs_batch_processor

def record_handler(record): return do_something_with(record["body"])

... (truncated)

Commits
  • 2f891e1 chore: update v2 layer ARN on documentation
  • 1ee1aa6 update changelog with latest changes
  • 6242bd8 bump version to 2.5.0
  • e9aacfb fix(event_handlers): omit explicit None HTTP header values (#1793)
  • 04eabd4 chore(deps-dev): bump isort from 5.11.2 to 5.11.3 (#1788)
  • 89deb9b chore(deps-dev): bump aws-cdk-lib from 2.54.0 to 2.55.1 (#1787)
  • 8fc4b6d chore(deps-dev): bump mypy-boto3-cloudwatch from 1.26.17 to 1.26.30 (#1785)
  • 409ced2 chore(deps-dev): bump isort from 5.10.1 to 5.11.2 (#1782)
  • 1dfe958 chore(deps-dev): bump pytest-asyncio from 0.20.2 to 0.20.3 (#1767)
  • 1641d37 chore(tests): move shared_functions to unit tests
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Dec 22, 2022
@dependabot dependabot bot force-pushed the dependabot/pip/lambda-powertools-feature-flags/app/aws-lambda-powertools-2.5.0 branch from c945b64 to a4532cd Compare December 22, 2022 07:13
Bumps [aws-lambda-powertools](https://github.com/awslabs/aws-lambda-powertools-python) from 1.31.1 to 2.5.0.
- [Release notes](https://github.com/awslabs/aws-lambda-powertools-python/releases)
- [Changelog](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/CHANGELOG.md)
- [Upgrade guide](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/docs/upgrade.md)
- [Commits](aws-powertools/powertools-lambda-python@v1.31.1...v2.5.0)

---
updated-dependencies:
- dependency-name: aws-lambda-powertools
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/lambda-powertools-feature-flags/app/aws-lambda-powertools-2.5.0 branch from a4532cd to f7d9162 Compare December 22, 2022 07:17
@rubenfonseca rubenfonseca merged commit fe86f9d into main Jan 9, 2023
@rubenfonseca rubenfonseca deleted the dependabot/pip/lambda-powertools-feature-flags/app/aws-lambda-powertools-2.5.0 branch January 9, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant