Skip to content

fix(event_handler): resolve dependency injection failure with arbitrary return types#8334

Merged
leandrodamascena merged 2 commits into
developfrom
fix/8330-depends-return-schema
Jul 13, 2026
Merged

fix(event_handler): resolve dependency injection failure with arbitrary return types#8334
leandrodamascena merged 2 commits into
developfrom
fix/8330-depends-return-schema

Conversation

@leandrodamascena

@leandrodamascena leandrodamascena commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Issue number: closes #8333

Summary

Changes

I added a skip to Pydantic schema generation for Depends() dependency return types, which crashed enable_validation=True when a dependency returned a non-Pydantic type (e.g. a boto3 client).

User experience

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


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.

@leandrodamascena leandrodamascena requested a review from a team as a code owner July 12, 2026 09:48
@leandrodamascena leandrodamascena requested a review from svozza July 12, 2026 09:48
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 12, 2026
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.63%. Comparing base (a9fce32) to head (1d67aa1).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8334   +/-   ##
========================================
  Coverage    96.63%   96.63%           
========================================
  Files          296      296           
  Lines        14764    14765    +1     
  Branches      1244     1245    +1     
========================================
+ Hits         14267    14268    +1     
  Misses         362      362           
  Partials       135      135           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 12, 2026
@sonarqubecloud

Copy link
Copy Markdown

@mergify

mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@leandrodamascena leandrodamascena merged commit 5bc8d00 into develop Jul 13, 2026
18 checks passed
@leandrodamascena leandrodamascena deleted the fix/8330-depends-return-schema branch July 13, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Dependency Injection with Pydantic Validation

2 participants