Skip to content
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

Move Event version to metadata instead of having hard coded version on event type #1668

Open
matzew opened this issue Oct 27, 2023 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@matzew
Copy link

matzew commented Oct 27, 2023

Feature request

I see that there are a couple of Tekton events, that have their version hard coded into their type/fqn. See:

// TriggerProcessingStartedV1 is sent for Sink Triggers when a trigger is started
TriggerProcessingStartedV1 = "dev.tekton.event.triggers.started.v1"
// TriggerProcessingSuccessfulV1 is sent for Sink Triggers when a trigger is successful
TriggerProcessingSuccessfulV1 = "dev.tekton.event.triggers.successful.v1"
// TriggerProcessingFailedEventV1 is sent for Sink Triggers when we fail to process trigger
TriggerProcessingFailedV1 = "dev.tekton.event.triggers.failed.v1"
// TriggerProcessingDoneV1 is sent for Sink Triggers when we are done
// with eventlistener handler
TriggerProcessingDoneV1 = "dev.tekton.event.triggers.done.v1"
// EventAccepted is sent as response for CloudEvent compliant providers
EventAccepted = "dev.tekton.event.triggers.accepted.v1"

I think if the event type was more generic, and the version would be stored on among the metadata of an event (instead of the event type itself) we have a cleaner design. In CloudEvent this could be done via an extension.

The same approach is now also take by the CNCF xregistry (spin-off from CloudEvents), event/message definitions can be grouped, and each definition/message (aka event) can have its own version as metadata/property:
https://github.com/xregistry/spec/blob/main/message/spec.md

@matzew matzew added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 27, 2023
@dibyom
Copy link
Member

dibyom commented Nov 15, 2023

/cc @afrittoli @khrm thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants