Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
SIP: CloudEvents HTTP for spin SDK #398
base: main
Are you sure you want to change the base?
SIP: CloudEvents HTTP for spin SDK #398
Changes from 10 commits
a8116a6
a805b2a
c91284a
2e6dbb9
c431707
e7bce65
fb05116
0c50258
21147d7
a9992f7
1a16393
6016731
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Spin (capital "S")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the schema enough to distinguish between (as I understand them) the binary and structured format of the event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between binary/structured formats is whether or not the CloudEvent specific attributes are in the HTTP headers or HTTP payloads. The binary format puts CE specific attributes in HTTP headers while the structured format put them in the payload. The difference should not be visiable to Spin users since Spin SDK will handle serialization/deserialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are both
schema
fields needed then?Could this be controlled by the component configuration only?
Also, this would have to be part of
component.trigger
instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the scenario where every component is a CloudEvent HTTP trigger, and in this case it might be easier to just configure the entire application to CloudEvent schema. On the other hand, if the application contains both HTTP and CloudEvent Http trigger, the user is allowed to specific which individual component is CloudEvent schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a trigger still relevant for the SIP?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as I put this in future considerations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a "sink address" specific for HTTP?
What is the default way of returning a result from a CloudEvents invocation?
For example, if there is an invocation triggered by an AMQP event, what is the expectation for the result?
Should the component itself make outbound requests (be those HTTP, or publish messages), or is it expected that the underlying runtime should do something with the returned event data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah forgot about the sink proposal. I was thinking to let the Spin runtime to send events to sinks, which are addressable. But now it makes more sense to just allow user to use
outbound-http-cloudevents
to send events.