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

fix(logger): correctly pick powertools or custom handler in custom environments #4295

Merged

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented May 8, 2024

Issue number: #4277

Summary

This PR fixes a bug when a compute environment or customer preconfigures a standard logging logger with the same Powertools logger name.

Previously, we'd always pick the first handler - child or parent. However, it led to pick the incorrect one if a logger we're creating for the first time (Logger) was already pre-setup through other means (logging.getLogger).

import logging
import os

from aws_lambda_powertools import Logger

service_name = os.getenv("POWERTOOLS_SERVICE_NAME")

# A environment, third-party library, or customer intentionally creates a logger with the same name as Powertools
# and add a Handler

logging.getLogger(service_name).addHandler(logging.StreamHandler())

logger = Logger(service=service_name)  # Powertools will ask standard logging to give the previously setup logger, then configure another handler etc as expected 

Changes

Please provide a summary of what's being changed

  • Encapsulate handler selection in _get_handler
  • Reverse depend registered_handler on _get_handler
  • Logger with two handlers and log items use both of them
  • The above with a child logger
  • Add explicit test for orphaned child without handler that will fail with AttributeError
  • Create a backwards compatible exception to provide actionable error on orphaned child formatter (e.g., child init before parent and append_keys)
  • Update docs to clarify child logger and their caveats

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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.

@heitorlessa heitorlessa requested a review from a team as a code owner May 8, 2024 10:55
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 8, 2024
@github-actions github-actions bot added the bug Something isn't working label May 8, 2024
@boring-cyborg boring-cyborg bot added the internal Maintenance changes label May 8, 2024
@github-actions github-actions bot removed the internal Maintenance changes label May 8, 2024
@boring-cyborg boring-cyborg bot added the internal Maintenance changes label May 8, 2024
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 8, 2024
@boring-cyborg boring-cyborg bot added the internal Maintenance changes label May 8, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 8, 2024
@github-actions github-actions bot removed the internal Maintenance changes label May 8, 2024
@boring-cyborg boring-cyborg bot added the internal Maintenance changes label May 8, 2024
@github-actions github-actions bot removed documentation Improvements or additions to documentation internal Maintenance changes labels May 8, 2024
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
@github-actions github-actions bot removed documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @heitorlessa! I've pushed a commit with two small things, but this LGTM! Congrats for this great catch and fix.

.gitignore Outdated Show resolved Hide resolved
.markdownlint.yaml Outdated Show resolved Hide resolved
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
@github-actions github-actions bot removed documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
@leandrodamascena leandrodamascena self-requested a review May 13, 2024 11:23
Signed-off-by: Heitor Lessa <lessa@amazon.nl>
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
Signed-off-by: Heitor Lessa <lessa@amazon.nl>
@github-actions github-actions bot removed documentation Improvements or additions to documentation internal Maintenance changes labels May 13, 2024
Copy link

sonarcloud bot commented May 13, 2024

Please retry analysis of this Pull-Request directly on SonarCloud

@leandrodamascena leandrodamascena merged commit 69d25ef into aws-powertools:develop May 13, 2024
14 checks passed
leandrodamascena added a commit that referenced this pull request May 15, 2024
* chore(deps): bump squidfunk/mkdocs-material from `e309089` to `98c9809` in /docs (#4236)

chore(deps): bump squidfunk/mkdocs-material in /docs

Bumps squidfunk/mkdocs-material from `e309089` to `98c9809`.

---
updated-dependencies:
- dependency-name: squidfunk/mkdocs-material
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump pytest from 8.1.1 to 8.2.0 (#4237)

Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@8.1.1...8.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/dependency-review-action from 4.2.5 to 4.3.1 (#4240)

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.2.5 to 4.3.1.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@5bbc3ba...e58c696)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump mkdocs-material from 9.5.19 to 9.5.20 (#4242)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.19 to 9.5.20.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@9.5.19...9.5.20)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.131 to 0.1.132 (#4239)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.131 to 0.1.132.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.131...v0.1.132)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump hvac from 2.1.0 to 2.2.0 (#4238)

Bumps [hvac](https://github.com/hvac/hvac) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/hvac/hvac/releases)
- [Changelog](https://github.com/hvac/hvac/blob/main/CHANGELOG.md)
- [Commits](hvac/hvac@v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: hvac
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump filelock from 3.13.4 to 3.14.0 (#4241)

Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.13.4 to 3.14.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](tox-dev/filelock@3.13.4...3.14.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/dependency-review-action from 4.3.1 to 4.3.2 (#4244)

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](actions/dependency-review-action@e58c696...0c155c5)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk from 2.139.0 to 2.139.1 (#4245)

Bumps [aws-cdk](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk) from 2.139.0 to 2.139.1.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.139.1/packages/aws-cdk)

---
updated-dependencies:
- dependency-name: aws-cdk
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump codecov/codecov-action from 4.3.0 to 4.3.1 (#4252)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@8450866...5ecb98a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.132 to 0.1.133 (#4246)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.132 to 0.1.133.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.132...v0.1.133)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump datadog-lambda from 5.93.0 to 5.94.0 (#4253)

Bumps [datadog-lambda](https://github.com/DataDog/datadog-lambda-python) from 5.93.0 to 5.94.0.
- [Release notes](https://github.com/DataDog/datadog-lambda-python/releases)
- [Commits](DataDog/datadog-lambda-python@v5.93.0...v5.94.0)

---
updated-dependencies:
- dependency-name: datadog-lambda
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump pytest-xdist from 3.5.0 to 3.6.1 (#4247)

Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-xdist@v3.5.0...v3.6.1)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cfn-lint from 0.86.4 to 0.87.0 (#4249)

Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint) from 0.86.4 to 0.87.0.
- [Release notes](https://github.com/aws-cloudformation/cfn-python-lint/releases)
- [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md)
- [Commits](aws-cloudformation/cfn-lint@v0.86.4...v0.87.0)

---
updated-dependencies:
- dependency-name: cfn-lint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk-lib from 2.139.0 to 2.139.1 (#4248)

Bumps [aws-cdk-lib](https://github.com/aws/aws-cdk) from 2.139.0 to 2.139.1.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](aws/aws-cdk@v2.139.0...v2.139.1)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4254)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* fix(ci): apply lessons learned to monthly roadmap reminder cross-repo (#4078)

* fix(parameters): make cache aware of single vs multiple calls

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore: cleanup, add test for single and nested

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore: first experiment with central but private workflow

* chore: test workflow

* chore(ci): test with branch over sha as it was not found

* chore(ci): use secrets for new workflow_call

* chore(ci): update named secret input

* chore(ci): apply least-privilege permissions at job level

* chore(ci): make monthly roadmap reminder workflow immutable for sec

* chore(ci): add note about cronjob

* chore: add powertools actions to allow list until releases are done

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

---------

Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: Heitor Lessa <lessa@amazon.com>

* chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.91 to 1.34.97 in the boto-typing group (#4257)

chore(deps-dev): bump mypy-boto3-dynamodb in the boto-typing group

Bumps the boto-typing group with 1 update: [mypy-boto3-dynamodb](https://github.com/youtype/mypy_boto3_builder).


Updates `mypy-boto3-dynamodb` from 1.34.91 to 1.34.97
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

---
updated-dependencies:
- dependency-name: mypy-boto3-dynamodb
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: boto-typing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk from 2.139.1 to 2.140.0 (#4256)

Bumps [aws-cdk](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk) from 2.139.1 to 2.140.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.140.0/packages/aws-cdk)

---
updated-dependencies:
- dependency-name: aws-cdk
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.133 to 0.1.134 (#4260)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.133 to 0.1.134.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.133...v0.1.134)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.139.0a0 to 2.139.1a0 (#4261)

chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha

Bumps [aws-cdk-aws-lambda-python-alpha](https://github.com/aws/aws-cdk) from 2.139.0a0 to 2.139.1a0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits)

---
updated-dependencies:
- dependency-name: aws-cdk-aws-lambda-python-alpha
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump slsa-framework/slsa-github-generator from 1.10.0 to 2.0.0 (#4179)

* chore(deps): bump slsa-framework/slsa-github-generator

Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) from 1.10.0 to 2.0.0.
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](slsa-framework/slsa-github-generator@v1.10.0...v2.0.0)

---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(ci): upgrade download-action to v4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: heitorlessa <lessa@amazon.co.uk>

* chore(deps-dev): bump aws-cdk-lib from 2.139.1 to 2.140.0 (#4259)

Bumps [aws-cdk-lib](https://github.com/aws/aws-cdk) from 2.139.1 to 2.140.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](aws/aws-cdk@v2.139.1...v2.140.0)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump mike from 1.1.2 to 2.1.0 (#4258)

Bumps [mike](https://github.com/jimporter/mike) from 1.1.2 to 2.1.0.
- [Release notes](https://github.com/jimporter/mike/releases)
- [Changelog](https://github.com/jimporter/mike/blob/master/CHANGES.md)
- [Commits](jimporter/mike@v1.1.2...v2.1.0)

---
updated-dependencies:
- dependency-name: mike
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4262)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps-dev): bump mike from 2.1.0 to 2.1.1 (#4268)

Bumps [mike](https://github.com/jimporter/mike) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/jimporter/mike/releases)
- [Changelog](https://github.com/jimporter/mike/blob/master/CHANGES.md)
- [Commits](jimporter/mike@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: mike
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump mkdocs-material from 9.5.20 to 9.5.21 (#4271)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.20 to 9.5.21.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@9.5.20...9.5.21)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cfn-lint from 0.87.0 to 0.87.1 (#4272)

Bumps [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint) from 0.87.0 to 0.87.1.
- [Release notes](https://github.com/aws-cloudformation/cfn-python-lint/releases)
- [Changelog](https://github.com/aws-cloudformation/cfn-lint/blob/main/CHANGELOG.md)
- [Commits](aws-cloudformation/cfn-lint@v0.87.0...v0.87.1)

---
updated-dependencies:
- dependency-name: cfn-lint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.139.1a0 to 2.140.0a0 (#4270)

chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha

Bumps [aws-cdk-aws-lambda-python-alpha](https://github.com/aws/aws-cdk) from 2.139.1a0 to 2.140.0a0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits)

---
updated-dependencies:
- dependency-name: aws-cdk-aws-lambda-python-alpha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.134 to 0.1.135 (#4273)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.134 to 0.1.135.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.134...v0.1.135)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4278)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps): bump squidfunk/mkdocs-material from `98c9809` to `11d7ec0` in /docs (#4269)

chore(deps): bump squidfunk/mkdocs-material in /docs

Bumps squidfunk/mkdocs-material from `98c9809` to `11d7ec0`.

---
updated-dependencies:
- dependency-name: squidfunk/mkdocs-material
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(event_handler): add decorator for HTTP HEAD verb (#4275)

chore(ci): changelog rebuild (#4262)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>

* chore(ci): changelog rebuild (#4289)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps-dev): bump coverage from 7.5.0 to 7.5.1 (#4288)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump sentry-sdk from 2.0.1 to 2.1.1 (#4287)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ruff from 0.4.2 to 0.4.3 (#4286)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jinja2 from 3.1.3 to 3.1.4 (#4283)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump jinja2 from 3.1.3 to 3.1.4 in /docs (#4284)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/checkout from 4.1.4 to 4.1.5 (#4282)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.4 to 3.0.5 (#4281)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.135 to 0.1.136 (#4285)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(typing): resolved_headers_field is not Optional (#4148)

Co-authored-by: Heitor Lessa <lessa@amazon.com>

* fix(parser): make etag optional field on S3 notification events (#4173)

Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
Co-authored-by: Heitor Lessa <lessa@amazon.com>

* docs(homepage): add link to new and official workshop (#4292)

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.136 to 0.1.139 (#4293)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.136 to 0.1.139.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.136...v0.1.139)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4294)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(governance): add FastAPI third party license attribution (#4297)

* chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 2 updates (#4302)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4304)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.139 to 0.1.140 (#4301)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(event-sources): sane defaults for authorizer v1 and v2 (#4298)

* fix(parameters): make cache aware of single vs multiple calls

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore: cleanup, add test for single and nested

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore(ci): add first centralized reusable workflow

* fix(event-sources): default dict and list in authorizers when not found

* chore: mypy constant type

* Delete bla.py

* Delete playground/.prettierrc

* Delete playground/app.mjs

---------

Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.140 to 0.1.142 (#4307)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.140 to 0.1.142.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.140...v0.1.142)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump aws-cdk from 2.140.0 to 2.141.0 (#4306)

Bumps [aws-cdk](https://github.com/aws/aws-cdk/tree/HEAD/packages/aws-cdk) from 2.140.0 to 2.141.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](https://github.com/aws/aws-cdk/commits/v2.141.0/packages/aws-cdk)

---
updated-dependencies:
- dependency-name: aws-cdk
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>

* chore(deps-dev): bump aws-cdk-lib from 2.140.0 to 2.141.0 (#4308)

Bumps [aws-cdk-lib](https://github.com/aws/aws-cdk) from 2.140.0 to 2.141.0.
- [Release notes](https://github.com/aws/aws-cdk/releases)
- [Changelog](https://github.com/aws/aws-cdk/blob/main/CHANGELOG.v2.md)
- [Commits](aws/aws-cdk@v2.140.0...v2.141.0)

---
updated-dependencies:
- dependency-name: aws-cdk-lib
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ruff from 0.4.3 to 0.4.4 (#4309)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4311)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 (#4315)

* chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.140.0a0 to 2.141.0a0 (#4318)

* chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.12 to 1.27.13 in /layer/scripts/layer-balancer in the layer-balancer group (#4319)

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.142 to 0.1.144 (#4316)

* chore(ci): changelog rebuild (#4321)

* chore(deps-dev): bump cfn-lint from 0.87.1 to 0.87.2 (#4317)

* feat(event_handler): add support for persisting authorization session in OpenAPI (#4312)

* feat(event_handler): add support for persisting authorization data in Swagger UI

* docs(event_handler): update docs for Swagger UI persist authorization feature

---------

Signed-off-by: Nicolas Lykke Iversen <14088508+nlykkei@users.noreply.github.com>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>

* chore(ci): changelog rebuild (#4322)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* fix(logger): correctly pick powertools or custom handler in custom environments (#4295)

* fix(parameters): make cache aware of single vs multiple calls

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore: cleanup, add test for single and nested

Signed-off-by: heitorlessa <lessa@amazon.co.uk>

* chore(ci): add first centralized reusable workflow

* fix: initial work on handler fix

* fix: make it backwards compatible for children behaviour

* chore: assert handlers; assert defaults create and use PT handler

* Delete bla.py

* chore: ignore bla

* Delete playground/app.mjs

* Delete playground/.prettierrc

* chore: improve orphaned child side effect with an explicit error

* fix: orphan exception must not be shadowed by attr exc

* chore: mypy

* docs(logger): clarify child loggers side effects; cleanup over-used banners

* chore: ignore type checking test coverage

* Fixing small things

* Update constants.py

Signed-off-by: Heitor Lessa <lessa@amazon.nl>

* Update constants.py

Signed-off-by: Heitor Lessa <lessa@amazon.nl>

---------

Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: Heitor Lessa <lessa@amazon.nl>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>

* chore(deps): bump squidfunk/mkdocs-material from `11d7ec0` to `8ef47d7` in /docs (#4323)

chore(deps): bump squidfunk/mkdocs-material in /docs

Bumps squidfunk/mkdocs-material from `11d7ec0` to `8ef47d7`.

---
updated-dependencies:
- dependency-name: squidfunk/mkdocs-material
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.144 to 0.1.145 (#4325)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.144 to 0.1.145.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.144...v0.1.145)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump mkdocs-material from 9.5.21 to 9.5.22 (#4324)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.21 to 9.5.22.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](squidfunk/mkdocs-material@9.5.21...9.5.22)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4326)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* chore(deps-dev): bump mypy-boto3-s3 from 1.34.91 to 1.34.105 in the boto-typing group (#4329)

chore(deps-dev): bump mypy-boto3-s3 in the boto-typing group

Bumps the boto-typing group with 1 update: [mypy-boto3-s3](https://github.com/youtype/mypy_boto3_builder).


Updates `mypy-boto3-s3` from 1.34.91 to 1.34.105
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

---
updated-dependencies:
- dependency-name: mypy-boto3-s3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: boto-typing
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump codecov/codecov-action from 4.3.1 to 4.4.0 (#4328)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@5ecb98a...6d79887)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.145 to 0.1.146 (#4330)

chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs

Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.145 to 0.1.146.
- [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases)
- [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md)
- [Commits](awslabs/generative-ai-cdk-constructs@v0.1.145...v0.1.146)

---
updated-dependencies:
- dependency-name: cdklabs-generative-ai-cdk-constructs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(ci): changelog rebuild (#4331)

Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>

* refactor(data-masking): remove Non-GA comments (#4334)

Removing comments

* Merging from develop

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: Heitor Lessa <lessa@amazon.com>
Signed-off-by: Nicolas Lykke Iversen <14088508+nlykkei@users.noreply.github.com>
Signed-off-by: Heitor Lessa <lessa@amazon.nl>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Powertools for AWS Lambda (Python) bot <151832416+aws-powertools-bot@users.noreply.github.com>
Co-authored-by: Heitor Lessa <lessa@amazon.com>
Co-authored-by: heitorlessa <lessa@amazon.co.uk>
Co-authored-by: Nicolas Lykke Iversen <14088508+nlykkei@users.noreply.github.com>
Co-authored-by: Nico Tonnhofer <github@wurstnase.de>
Co-authored-by: Benjamin Gorman <8076bgorman@gmail.com>
Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working commons logger size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: logger_handler argument is ignored if logging.getLogger() already has a handler.
2 participants