Skip to content

feat: init trigger routes set up for event processing#688

Open
anFatum wants to merge 1 commit intogoogle:mainfrom
anFatum:init-ambient-agent-processing
Open

feat: init trigger routes set up for event processing#688
anFatum wants to merge 1 commit intogoogle:mainfrom
anFatum:init-ambient-agent-processing

Conversation

@anFatum
Copy link
Copy Markdown
Contributor

@anFatum anFatum commented Mar 27, 2026

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)

@anFatum anFatum force-pushed the init-ambient-agent-processing branch 4 times, most recently from e60d58f to 026d73f Compare March 30, 2026 11:45
Copy link
Copy Markdown
Collaborator

@kdroste-google kdroste-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the plan for that? Should it stay unimplemented?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.cloud.google.com/eventarc/docs/reference/rest/v1/projects.locations.operations#resource:-operation says

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But where do we have the information about "Status" field from? What are possible values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@anFatum anFatum force-pushed the init-ambient-agent-processing branch 2 times, most recently from 4de232f to b2fe082 Compare March 30, 2026 13:04
@anFatum anFatum requested a review from kdroste-google March 30, 2026 13:05
Copy link
Copy Markdown
Collaborator

@kdroste-google kdroste-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But where do we have the information about "Status" field from? What are possible values?

@anFatum anFatum force-pushed the init-ambient-agent-processing branch 3 times, most recently from ecbeaf6 to 18191f7 Compare April 2, 2026 13:25
@anFatum
Copy link
Copy Markdown
Contributor Author

anFatum commented Apr 2, 2026

Let's add at least one implementation and skip "unimplemented" ones

Done, I've removed eventarc and bq for now and left only the pubsub trigger support

@anFatum anFatum force-pushed the init-ambient-agent-processing branch from 18191f7 to 711b770 Compare April 2, 2026 13:27
@anFatum anFatum requested a review from kdroste-google April 2, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants