Skip to content

fix(protobuf)!: Expose CloudEvent structure with explicit fields #1354

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yordis
Copy link

@yordis yordis commented Jul 10, 2025

Previously, all optional CloudEvent attributes were hidden within a generic
map structure alongside extension attributes.

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

@yordis yordis force-pushed the yordis/protobuffer-message-format branch from 4c5050b to c62b56a Compare July 10, 2025 17:42
@yordis yordis changed the title refactor(protobuf): Expose CloudEvent structure with explicit fields fix(protobuf)!: Expose CloudEvent structure with explicit fields Jul 10, 2025
Previously, all optional CloudEvent attributes were hidden within a generic
map structure alongside extension attributes.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the yordis/protobuffer-message-format branch from c62b56a to 5226604 Compare July 10, 2025 17:42
@@ -2,7 +2,8 @@
* CloudEvent Protobuf Format
*
* - Required context attributes are explicitly represented.
* - Optional and Extension context attributes are carried in a map structure.
* - Optional context attributes are explicitly represented.
* - Extension context attributes are carried in a map structure.
Copy link
Collaborator

Choose a reason for hiding this comment

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

One of the things that CE has really pushed hard for is the idea that spec-defined attributes and extensions should be treated (and serialized) the same way. The idea of "extension buckets" is something we've avoided.

So, when I see the above text it makes me nervous. Could this be why it was done this way originally?
If, in the future, some extension becomes an OPTIONAL spec-defined attribute, what would change in the protobuf stuff? Ideally nothing, but I suspect with this PR that's not the case. Now, some formats may force us to violate our goal, and I know nothing about protobuf, but I wanted to mention this as we discuss this PR.

Copy link
Author

Choose a reason for hiding this comment

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

Most likely that was the intent, if such extension becomes part of the schema, you would need such schema version to understand the new message-level field

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.

2 participants