feat: init trigger routes set up for event processing#688
feat: init trigger routes set up for event processing#688anFatum wants to merge 1 commit intogoogle:mainfrom
Conversation
e60d58f to
026d73f
Compare
kdroste-google
left a comment
There was a problem hiding this comment.
General remark: maybe it would be good to refer to the external sources with current state copied to the comment. We don't know how the external site will evolve.
|
|
||
| // BQTriggerHandler handles the BigQuery trigger endpoint. | ||
| func (c *TriggersAPIController) BQTriggerHandler(w http.ResponseWriter, r *http.Request) { | ||
| Unimplemented(w, r) |
There was a problem hiding this comment.
What's the plan for that? Should it stay unimplemented?
There was a problem hiding this comment.
I will add the implementation if the following PRs, I didn't want to have a one huge PR to review
But if you prefer having implementation now let me know I'll add it here :)
There was a problem hiding this comment.
Yes, please, perhaps let's add one working piece, and later on - the rest
| } | ||
|
|
||
| // TriggerResponse represents the standard response for Pub/Sub and Eventarc triggers. | ||
| type TriggerResponse struct { |
There was a problem hiding this comment.
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following:
error | object (Status)The error result of the operation in case of failure or cancellation.
response | objectThe normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following:
error
object (Status)
The error result of the operation in case of failure or cancellation.
response
object
The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.
it may be not the right example... If it is, we can have either error or response.
There was a problem hiding this comment.
I'm not quite sure I understand, the Eventarc triggers will be used (e.g.https://codelabs.developers.google.com/eventarc-workflows-cloud-run#4)
and they follow the logic of ACKing the Pub/Sub
There was a problem hiding this comment.
But where do we have the information about "Status" field from? What are possible values?
There was a problem hiding this comment.
Just additional info, the status code will be used to determine if the processing succeeded, status just an additional field that will be propagated with the error, I can remove it and report only status code
4de232f to
b2fe082
Compare
kdroste-google
left a comment
There was a problem hiding this comment.
Let's add at least one implementation and skip "unimplemented" ones
| } | ||
|
|
||
| // TriggerResponse represents the standard response for Pub/Sub and Eventarc triggers. | ||
| type TriggerResponse struct { |
There was a problem hiding this comment.
But where do we have the information about "Status" field from? What are possible values?
ecbeaf6 to
18191f7
Compare
Done, I've removed eventarc and bq for now and left only the pubsub trigger support |
18191f7 to
711b770
Compare
Extends the ADK Web with Event processing endpoints based on the provided flags, this will be used to allow users specify ADK Web endpoints as the processing endpoints for Pubsub, Eventarc and BigQuery GCP services. (see the details in go/orcas-rfc-522)