-
Notifications
You must be signed in to change notification settings - Fork 224
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
Helper function to create event from HTTP Request or Response #799
Conversation
A bit more detail: The line linked above is reached for events in binary encoding. When it happens, the transform statement is creating a transformer. Non-binary events are successfully created and returned earlier, and the Transformers slice is empty. |
Signed-off-by: Adam Ross <adamross@google.com>
Co-authored-by: Scott Nichols <n3wscott@tableflip.dev>
Co-authored-by: Scott Nichols <n3wscott@tableflip.dev>
Co-authored-by: Scott Nichols <n3wscott@tableflip.dev>
Co-authored-by: Scott Nichols <n3wscott@tableflip.dev>
Thanks for the help troubleshooting. I'm going to clean this up to make it a non-draft. Do you think there should be a passthru for transformers? |
Signed-off-by: Adam Ross <adamross@google.com>
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.
Looks like you just need to fix the signing and you will be good to go
I've signed off many of the commits, not sure how to fix it for all of them. Looking at the DCO doc, it looks like someone with write access can override. Can you point me to what my next step should be? |
Thanks! I got it! |
Fixes #766
This PR provides two new functions: NewEventFromHttpRequest and NewEventFromHttpResponse. Both are added to v2/alias.go, and NewEventFromHttpRequest is also demonstrated in the README and docs.
I included HttpResponse because I saw the Message methods covered it. I included docs updates because I've visited the README and docs multiple times looking for this function. Happy to remove either if they are considered unnecessary or out of scope.
Creating this PR as a draft because the test coverage I've created routinely segfaults when it begins executing the transformation logic at:
sdk-go/v2/binding/to_event.go
Line 61 in c623f8b
Here is an example of how this looks on my machine: