Skip to content

Incorrect kafka example event and marshaling #390

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
LegNeato opened this issue Aug 26, 2021 · 3 comments
Closed

Incorrect kafka example event and marshaling #390

LegNeato opened this issue Aug 26, 2021 · 3 comments

Comments

@LegNeato
Copy link
Contributor

LegNeato commented Aug 26, 2021

Incorrect kafka example event and marshaling.

#385 changed the logic and example data. In that PR, there was a comment "Array and slice values encode as JSON arrays, except that []byte encodes as a base64-encoded string, and a nil slice encodes as the null JSON value."

So while the Go code was changed to []byte, the example event checked in doesn't have the value as a base64-encoded string and instead includes a json array.

Either the Go code should change to an Array or slice or the example event should be changed to include a base64 string. I am not sure which is correct (I haven't used this event type so I don't know what AWS sends), but they currently do not match--which is why the assertion had to be incorrectly deleted.

This is breaking code generation in calavera/aws-lambda-events#39 as we actually assert the event can be round-tripped and use the aforementioned byte[] encoding.

@LegNeato
Copy link
Contributor Author

@ianpyw

@LegNeato
Copy link
Contributor Author

Adding @keshayad so he is aware as he merged the PR.

ianpyw added a commit to ianpyw/aws-lambda-go that referenced this issue Aug 26, 2021
Update Kafka header based on aws#390
ianpyw added a commit to ianpyw/aws-lambda-go that referenced this issue Aug 26, 2021
Update kafka test base on aws#390
@LegNeato
Copy link
Contributor Author

This was fixed by #392, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant