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

Clarify usage of source for CDEvents #29

Open
afrittoli opened this issue Feb 21, 2022 · 2 comments
Open

Clarify usage of source for CDEvents #29

afrittoli opened this issue Feb 21, 2022 · 2 comments
Labels
cloudevents Specification - CloudEvents Binding roadmap Items on the roadmap spec Specification - Core CDEvents
Milestone

Comments

@afrittoli
Copy link
Contributor

CDEvents include a source field that matches the source in CloudEvents (type: URI-reference). source + id should be globally unique, which means that source should identify the producer of events using a URI-reference.

I'm using Tekton events as an example of the possible options.
In Tekton today the source looks like:

"Ce-Id": "77f78ae7-ff6d-4e39-9d05-b9a0b7850527",
"Ce-Source": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/curl-run-6gplk",
"Ce-Specversion": "1.0",
"Ce-Subject": "curl-run-6gplk",
"Ce-Time": "2021-01-29T14:47:58.157819Z",
"Ce-Type": "dev.tekton.event.taskrun.unknown.v1",

However this is problematic because the source is different for every subject, which makes filtering events harder.
An alternative could be to use in the source the website of the platform that produces events, e.g.

"Ce-Id": "77f78ae7-ff6d-4e39-9d05-b9a0b7850527",
"Ce-Source": "https://tekton.dev/",
"Ce-Specversion": "1.0",
"Ce-Subject": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/curl-run-6gplk",
"Ce-Time": "2021-01-29T14:47:58.157819Z",
"Ce-Type": "dev.tekton.event.taskrun.unknown.v1",

That means that all events generated by any instance of Tekton would have the same source though.
I'm not aware of any standard way of identifying an instance of an application via an URI.
We could define something like <org-namespace>/tekton/<instance-descriptor>:

"Ce-Source": "tekton.dev/tekton/dogfooding",

This could identify the dogfooding Tekton instance used by the Tekton community.
Thoughts?

@afrittoli afrittoli added this to the v0.1 milestone Feb 21, 2022
@afrittoli afrittoli added cloudevents Specification - CloudEvents Binding spec Specification - Core CDEvents labels Feb 21, 2022
@m-linner-ericsson
Copy link
Contributor

In Eiffel we have an object to describe the source, see the meta.source in Activity Triggered.

I would like to state something like

Source: Describes the sender of the event. By using the source the receiver should have the possibility to pinpoint the instance that sent the event.

@afrittoli afrittoli removed this from the v0.1 milestone Aug 17, 2022
@afrittoli afrittoli added the roadmap Items on the roadmap label Oct 6, 2022
@e-backmark-ericsson e-backmark-ericsson added this to the v0.2 milestone Oct 21, 2022
@afrittoli afrittoli modified the milestones: v0.2, v0.3 Dec 13, 2022
@afrittoli afrittoli mentioned this issue Feb 12, 2023
4 tasks
@afrittoli afrittoli added this to the v0.4 milestone Jun 5, 2023
@afrittoli
Copy link
Contributor Author

afrittoli commented Jun 13, 2023

A diagram would help clarifying what source means for different event types.

  • Create an issue to track the work on the diagram
  • Collect source from current implementation (Tekton, Jenkins, Spinnaker, Testkube)

Subject source adds to the complexity / confusion.

@e-backmark-ericsson e-backmark-ericsson modified the milestones: v0.4, v0.5 Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudevents Specification - CloudEvents Binding roadmap Items on the roadmap spec Specification - Core CDEvents
Projects
Status: Todo
Development

No branches or pull requests

3 participants