What is the correct/best way to create a Cloudevents extension? #60
Replies: 2 comments 1 reply
-
The CloudEvents documentation states
So, my takeaway is that we will have very few attributes related to routing or processing, so most or all of our stuff should go into the data payload. |
Beta Was this translation helpful? Give feedback.
-
Currently, our events look like this: {
"data": {
"pipeline": "data"
},
"datacontenttype": "application/json",
"id": "8ba216bb-b443-4019-956e-f9b4d1700847",
"pipelinerunerrors": "Hopfully no errors",
"pipelinerunid": "pipe1",
"pipelinerunname": "My Pipeline",
"pipelinerunstatus": "Starting",
"pipelinerunurl": "http://my-pipelinerunner",
"source": "cde-cli",
"specversion": "1.0",
"time": "2021-07-16T14:30:33.1000937Z",
"type": "cd.pipelinerun.started.v1"
}
but could also look like this: {
"data": {
"pipeline": "data",
"pipelinerunerrors": "Hopfully no errors",
"pipelinerunid": "pipe1",
"pipelinerunname": "My Pipeline",
"pipelinerunstatus": "Starting",
"pipelinerunurl": "http://my-pipelinerunner",
},
"datacontenttype": "application/json",
"id": "8ba216bb-b443-4019-956e-f9b4d1700847",
"source": "cde-cli",
"specversion": "1.0",
"time": "2021-07-16T14:30:33.1000937Z",
"type": "cd.pipelinerun.started.v1"
} which I feel is more in line with the quote above from @erkist. |
Beta Was this translation helpful? Give feedback.
-
Should we have our CDF SIG Events definitions as properties on the top level in the Cloudevent, or as data payload, or as a combination of the two?
The discussion started in this PR: #55 (comment), but should continue here.
Beta Was this translation helpful? Give feedback.
All reactions