8000 fix(event-handler): enable path parameters on Bedrock handler by rubenfonseca · Pull Request #3312 · aws-powertools/powertools-lambda-python · GitHub
[go: up one dir, main page]

Skip to content

fix(event-handler): enable path parameters on Bedrock handler #3312

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

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

rubenfonseca
Copy link
Contributor

Issue number: #3261

Summary

Changes

Please provide a summary of what's being changed

This PR fixes a bug with path parameters when using Bedrock agents.

When you have a Bedrock Agent API with path parameters (e.g: /claims/<claim_id>), Bedrock
doesn't actually pass the parameter on the path. It calls your API with path /claims/<claim_id> and passes claim_id
as part of the properties.

User experience

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

After the PR the Bedrock Agent handler can be used with path parameters.

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.

@rubenfonseca rubenfonseca requested a review from a team November 9, 2023 14:50
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 9, 2023
@rubenfonseca rubenfonseca linked an issue Nov 9, 2023 that may be closed by this pull request
2 tasks
@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 Nov 9, 2023
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.

APPROVED!

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link
codecov-commenter commented Nov 10, 2023< 8000 /relative-time>

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ed3f07b) 95.32% compared to head (143072c) 95.34%.
Report is 10 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3312      +/-   ##
===========================================
+ Coverage    95.32%   95.34%   +0.01%     
===========================================
  Files          208      208              
  Lines         9607     9618      +11     
  Branches      1759     1764       +5     
===========================================
+ Hits          9158     9170      +12     
+ Misses         333      332       -1     
  Partials       116      116              
Files Coverage Δ
aws_lambda_powertools/event_handler/api_gateway.py 98.15% <100.00%> (+<0.01%) ⬆️
...s_lambda_powertools/event_handler/bedrock_agent.py 100.00% <100.00%> (ø)
...mbda_powertools/event_handler/openapi/constants.py 100.00% <100.00%> (ø)
..._lambda_powertools/event_handler/openapi/params.py 88.07% <100.00%> (ø)
...ools/utilities/data_classes/bedrock_agent_event.py 100.00% <100.00%> (+1.42%) ⬆️
...mbda_powertools/event_handler/openapi/dependant.py 84.78% <66.66%> (+3.93%) ⬆️

... and 1 file with indirect coverage changes

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

@leandrodamascena leandrodamascena merged commit 1e22e6f into develop Nov 10, 2023
@leandrodamascena leandrodamascena deleted the rf/bedrock-handler-fixes branch November 10, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event_handlers size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests
Projects
None yet
45B1
Development

Successfully merging this pull request may close these issues.

Feature request: Add support for the Bedrock Agent event and response formats
4 participants
0