-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: Update adk_app handling to use custom module without .py extension #2374
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
Conversation
Response from ADK Triaging Agent
Hello @vinodseshadri, thank you for creating this PR!
This PR is a bug fix, could you please provide the command line output after the fix is applied?
This information will help reviewers to review your PR more efficiently. Thanks!
Response from ADK Triaging Agent
Hello @vinodseshadri, thank you for creating this PR!
This PR is a bug fix, could you please provide the command line output after the fix is applied?
This information will help reviewers to review your PR more efficiently. Thanks!
Here is execution with no adk_app added
adk deploy agent_engine --project=xxx --region=us-east4 --staging_bucket="gs://xxxx" --display_name="test_adk" '/Users/xxx/Code/adk-python/downloads/test_agent'
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/pydantic/_internal/_fields.py:198: UserWarning: Field name "config_type" in "SequentialAgent" shadows an attribute in parent "BaseAgent"
warnings.warn(
Copying agent source code...
Copying agent source code complete.
Initializing Vertex AI...
Resolving files and dependencies...
Creating /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/test_agent/requirements.txt...
Created /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/test_agent/requirements.txt
Vertex AI initialized.
Using adk_app: agent_engine_app
Created /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/agent_engine_app.py
Files and dependencies resolved
Running `absolufy-imports /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/test_agent/__init__.py`
Running `absolufy-imports /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/test_agent/agent.py`
Deploying to agent engine...
Reading requirements from requirements='/var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802/test_agent/requirements.txt'
Read the following lines: ['google-cloud-aiplatform[adk,agent_engines]']
Identified the following requirements: {'cloudpickle': '3.1.1', 'pydantic': '2.11.7'}
The following requirements are missing: {'cloudpickle', 'pydantic'}
The following requirements are appended: {'cloudpickle==3.1.1', 'pydantic==2.11.7'}
The final list of requirements: ['google-cloud-aiplatform[adk,agent_engines]', 'cloudpickle==3.1.1', 'pydantic==2.11.7']
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/google/auth/_default.py:76: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. See the following page for troubleshooting: https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/google/auth/_default.py:76: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. See the following page for troubleshooting: https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
Using bucket xxx
Wrote to gs://xxx/agent_engine/agent_engine.pkl
Writing to gs://xxx/agent_engine/requirements.txt
Creating in-memory tarfile of extra_packages
Writing to gs://xxx/agent_engine/dependencies.tar.gz
Cleaning up the temp folder: /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_122802
Below example with a test_adk.py file in the agent folder with adk_app as test_adk.py
adk deploy agent_engine --project=xxxx --region=us-east4 --staging_bucket="gs://xxx" --display_name="test_adk" '/Users/xxx/Code/adk-python/downloads/test_agent' --adk_app test_adk
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/pydantic/_internal/_fields.py:198: UserWarning: Field name "config_type" in "SequentialAgent" shadows an attribute in parent "BaseAgent"
warnings.warn(
Copying agent source code...
Copying agent source code complete.
Initializing Vertex AI...
Resolving files and dependencies...
Creating /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/requirements.txt...
Created /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/requirements.txt
Vertex AI initialized.
Using adk_app: test_adk
Using existing test_adk.py
Files and dependencies resolved
Running `absolufy-imports /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/test_adk.py`
Running `absolufy-imports /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/__init__.py`
Running `absolufy-imports /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/agent.py`
Deploying to agent engine...
Reading requirements from requirements='/var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303/test_agent/requirements.txt'
Read the following lines: ['google-cloud-aiplatform[adk,agent_engines]']
Identified the following requirements: {'cloudpickle': '3.1.1', 'pydantic': '2.11.7'}
The following requirements are missing: {'cloudpickle', 'pydantic'}
The following requirements are appended: {'cloudpickle==3.1.1', 'pydantic==2.11.7'}
The final list of requirements: ['google-cloud-aiplatform[adk,agent_engines]', 'cloudpickle==3.1.1', 'pydantic==2.11.7']
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/google/auth/_default.py:76: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. See the following page for troubleshooting: https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/google/auth/_default.py:76: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. See the following page for troubleshooting: https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
Using bucket xxx
Wrote to gs://xxx/agent_engine/agent_engine.pkl
Writing to gs://xxx/agent_engine/requirements.txt
Creating in-memory tarfile of extra_packages
Writing to gs://xxx/agent_engine/dependencies.tar.gz
/Users/vinodseshadri/venvs/adk-quickstart/lib/python3.9/site-packages/google/auth/_default.py:76: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. See the following page for troubleshooting: https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
Cleaning up the temp folder: /var/folders/6j/966cqj6d24xbnzp9lfrp4_b00000gn/T/agent_engine_deploy_src/20250806_123303
Hi sorry for the slow response here, this is a great contribution! Can you resolve the merge conflicts? I'll be able to follow-up from there
Uh oh!
There was an error while loading. Please reload this page.
Pull Request Description
This pull request addresses a critical issue in the
cli_deploy.pymodule -where in theadk_appwas ignoredIssues fixed
fixes #2298
Changes done
adk_appis set and if it is then copy the py file from agent source folder instead of creatingadd_appto a constant so that it can be revisited later easily