Helper function to create event from HTTP Request or Response#799
Helper function to create event from HTTP Request or Response#799n3wscott merged 7 commits intocloudevents:mainfrom
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>
n3wscott
left a comment
There was a problem hiding this comment.
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: