Skip to content

Conversation

@JemDay
Copy link
Contributor

@JemDay JemDay commented Mar 6, 2023

Modified ProtoCloudEventData to always return a Protobuf Any object - this ensures it is coherent with the Protobuff CloudEvent format specification.

It remains possible to wrap any Protobuf 'Message' object directly (which includes an 'Any') as a convienience to reduce application code.

Closes #532

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JemDay
Copy link
Contributor Author

JemDay commented Mar 7, 2023

Do we have or can we add tests on the new getAny when data is binary_data or text_data [1] ?

Yes .. in two situations:

  • The 'serialize' test verifies that CE's are being serialized correctly .. that set includes both binary and text data.
  • The original 'roundTripTest' does a exp-wire-format -> CloudEvent -> act-wire-format round-trip to ensure (actual == expected) at the wire level - that test set also includes both binary and textual cloud event data

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JemDay !

@pierDipi pierDipi merged commit 4c81f3e into cloudevents:main Mar 10, 2023
@JemDay JemDay deleted the jd-issue-532 branch March 10, 2023 21:05
skepticoitusInteruptus pushed a commit to skepticoitusInteruptus/sdk-java that referenced this pull request Mar 23, 2023
Modified ProtoCloudEventData to always return a
Protobuf Any object - this ensures it is coherent with
the Protobuf CloudEvent format specification.

It remains possible to wrap any Protobuf 'Message'
object directly (which includes an 'Any') as a
convienience to reduce application code.

Signed-off-by: Jem Day <[email protected]>
Signed-off-by: Randi Sheaffer-Klass <[email protected]>
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

Successfully merging this pull request may close these issues.

[protobuf] 'create' and 'read' aren't entirely symmetrical

2 participants