Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: passthrough extra args for adk deploy cloud_run as Cloud Run args #2544

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

Closed
jackwotherspoon wants to merge 19 commits into google:main from jackwotherspoon:main

Conversation

@jackwotherspoon
Copy link
Contributor

@jackwotherspoon jackwotherspoon commented Aug 14, 2025
edited
Loading

The command adk deploy cloud_run supports limited gcloud run deploy args 😢.

Which makes the command fine for simple deployments...

It should support all current and future Cloud Run deployment args for the command to be widely adopted.

This can easily be done by passing through all extra args passed to adk deploy cloud_run to gcloud...

This PR assumes any extra args/flags passed after AGENT_PATH are gcloud flags.

Example

# ADK flags
adk deploy cloud_run \
--project=$GOOGLE_CLOUD_PROJECT \
--region=$GOOGLE_CLOUD_LOCATION \
$AGENT_PATH \
# Use the -- separator for gcloud args
-- \
--min-instances=2 \
--no-allow-unauthenticated

This gives full Cloud Run feature support to ADK users 🤖 🚀

Test Plan

To test you can just build locally or pip install feature branch directly:

uv venv
uv pip install git+https://github.com/jackwotherspoon/adk-python.git

Deploy to Cloud Run using additional arguments following AGENT_PATH, such as --min-instance=2 or --description="Cloud Run test":

uv run adk deploy cloud_run \
--project=$GOOGLE_CLOUD_PROJECT \
--region=$GOOGLE_CLOUD_LOCATION \
--with_ui \
$AGENT_PATH \
-- \
--labels=test-label=adk \
--min-instances=2

You can click on the Cloud Run service after deployment and check the service yaml, you should see the additional label etc.

image

Fixes #2351

Copy link
Collaborator

adk-bot commented Aug 14, 2025

Response from ADK Triaging Agent

Hello @jackwotherspoon, thank you for creating this PR!

To help us review this PR, could you please address the following from our contribution guidelines:

  • Single Commit: Please squash the multiple commits into a single commit.
  • Testing Plan: Please include a testing plan section in your PR description to detail how you've tested these changes.

You can find more details in our contribution guidelines.

This information will help reviewers to review your PR more efficiently. Thanks!

Copy link
Collaborator

hangfei commented Aug 14, 2025

Please add testing plan(log or screenshot)

@hangfei hangfei self-requested a review August 14, 2025 21:57
Copy link
Collaborator

adk-bot commented Aug 14, 2025

Response from ADK Triaging Agent

Hello @jackwotherspoon, thank you for updating the PR with a testing plan!

Before this can be reviewed, could you please address the following:

  • CI Checks: The pyink-check and test (3.9) checks are failing. Please fix these issues so all checks are passing.
  • Single Commit: As mentioned previously, please squash the multiple commits into a single one.

You can find more details in our contribution guidelines.

These changes are needed before the reviewers can proceed. Thank you!

@adk-bot adk-bot added bot triaged tools [Component] This issue is related to tools labels Aug 15, 2025
Copy link
Collaborator

@jackwotherspoon I see there is a merge conflict, could you help resolve?

@Jacksunwei Jacksunwei added the ready to pull [Status] This PR is ready to be importing back to Google label Aug 25, 2025
copybara-service bot pushed a commit that referenced this pull request Aug 25, 2025
...args
Merge #2544
The command `adk deploy cloud_run` supports limited `gcloud run deploy` args 😢.
Which makes the command fine for simple deployments...
It should support all current and future Cloud Run deployment args for the command to be widely adopted.
This can easily be done by passing through all extra args passed to `adk deploy cloud_run` to gcloud...
This PR assumes any extra args/flags passed after `AGENT_PATH` are gcloud flags.
## Example
```sh
# ADK flags
adk deploy cloud_run \
--project=$GOOGLE_CLOUD_PROJECT \
--region=$GOOGLE_CLOUD_LOCATION \
$AGENT_PATH \
# Use the -- separator for gcloud args
-- \
--min-instances=2 \
--no-allow-unauthenticated
```
This gives full Cloud Run feature support to ADK users 🤖 🚀
## Test Plan
To test you can just build locally or pip install feature branch directly:
```
uv venv
uv pip install git+https://github.com/jackwotherspoon/adk-python.git
```
Deploy to Cloud Run using additional arguments following `AGENT_PATH`, such as `--min-instance=2` or `--description="Cloud Run test"`:
```sh
uv run adk deploy cloud_run \
--project=$GOOGLE_CLOUD_PROJECT \
--region=$GOOGLE_CLOUD_LOCATION \
--with_ui \
$AGENT_PATH \
-- \
--labels=test-label=adk \
--min-instances=2
```
You can click on the Cloud Run service after deployment and check the service yaml, you should see the additional label etc.
<img width="1612" height="622" alt="image" src="https://github.com/user-attachments/assets/596a260a-0052-460b-9642-c18900ccf7c9" />
Fixes #2351
COPYBARA_INTEGRATE_REVIEW=#2544 from jackwotherspoon:main 184a4d7
PiperOrigin-RevId: 799252544
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Jacksunwei Jacksunwei Jacksunwei approved these changes

@hangfei hangfei Awaiting requested review from hangfei

Labels

ready to pull [Status] This PR is ready to be importing back to Google tools [Component] This issue is related to tools

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support for --add-cloudsql-instances flag in adk deploy cloud_run command

AltStyle によって変換されたページ (->オリジナル) /