Skip to content

Bug: v2.40.0 undocumented breaking change in Router #4649

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

Closed
inita-app opened this issue Jun 28, 2024 · 2 comments
Closed

Bug: v2.40.0 undocumented breaking change in Router #4649

inita-app opened this issue Jun 28, 2024 · 2 comments
Labels
bug Something isn't working triage Pending triage from maintainers

Comments

@inita-app
Copy link

Expected Behaviour

In out code we accessed current_event directly from Router class befor 2.40.0

Current Behaviour

In 2.40.0 version current_event available in AppSyncResolver only

Code snippet

from aws_lambda_powertools.event_handler import AppSyncResolver
from aws_lambda_powertools.event_handler.appsync import Router

user_router = Router()

@user_router.resolver(field_name="user")
def get_user() -> dict:
    return service.get_user_by_id(user_id=user_router.current_event.identity.sub)

app = AppSyncResolver()
app.include_router(user_router)

Possible Solution

No response

Steps to Reproduce

call current_event attribute from Router class

Powertools for AWS Lambda (Python) version

2.40.0

AWS Lambda function runtime

3.12

Packaging format used

Lambda Layers

Debugging logs

No response

@inita-app inita-app added bug Something isn't working triage Pending triage from maintainers labels Jun 28, 2024
Copy link

boring-cyborg bot commented Jun 28, 2024

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@leandrodamascena leandrodamascena moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Pending triage from maintainers
Projects
Status: Shipped
Development

No branches or pull requests

1 participant