Skip to content

Conversation

jackwotherspoon
Copy link
Contributor

@jackwotherspoon jackwotherspoon commented Aug 14, 2025

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

@adk-bot
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!

@hangfei
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
@adk-bot
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 [Bot] This issue is triaged by ADK bot tools [Component] This issue is related to tools labels Aug 15, 2025
@adk-bot adk-bot requested a review from seanzhou1023 August 15, 2025 12:58
@Jacksunwei
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
@Jacksunwei Jacksunwei closed this Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot triaged [Bot] This issue is triaged by ADK bot 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
Development

Successfully merging this pull request may close these issues.

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