-
Notifications
You must be signed in to change notification settings - Fork 333
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
Add call unique id to handler kwargs #545
Conversation
I share your need for allowing users to access the request id. Currently, this library is lacking at that point. But I'm hesitant about this PR. It is a breaking change to the main API: the handler. So potentially, it breaks a lot of code for users of this library. I'm thinking out loud here and considering some alternative implementations:
I'm going to be unavailable during the Holidays, so I might respond in a few weeks. |
@OrangeTux makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clear definition in the tests
Issue Link: mobilityhouse#544 The `call_unique_id` is passed to the `on` and `after` handlers only if it is explicitly set in the handler signature.
At the level of ChargePoint.handle_call, currently the library only passes the message payload to the _on_action, and _after_action handlers.
For some features like logging the messages being treated by those handlers, it would be nice to pass the Call.unique_id as well.
⚠️ This will be a breaking change though as all the handlers defined by the library clients should always define call_unique_id in the kwargs, hence the label For inclusion in release 1.0.0=> Not a breaking change anymore after introducing the signature check.Issue Link: #544