GoogleCloudPlatform / GoogleCloudPlatform/agentsmithy
Bug: Missing `google-cloud-dataplex` dependency causes Cloud Run deployment failure out of the box
- Dominant language
- Python
- Stars
- 121
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone,
When following the deployment tutorial for Cloud Run, the `agent-bar-v2` container crashes on startup. The application fails to initialize because the ADK BigQuery toolset relies on dataplex dependencies, which are not included in the project's dependencies.
This prevents the agent from deploying successfully out of the box.
**Error Logs**
```python
File "/usr/local/lib/python3.12/site-packages/google/adk/integrations/bigquery/client.py", line 26, in
from google.cloud import dataplex_v1
ImportError: Fail to load 'agent_bar_v2' module. cannot import name 'dataplex_v1' from 'google.cloud' (unknown location)
```
**Expected behavior**
The Cloud Run service should start successfully and initialize the agent out of the box without requiring manual dependency updates.
**Workaround / Suggested Fix**
I was able to resolve this locally by simply adding the missing dependency directly to the `pyproject.toml` file and rebuilding the container:
```toml
google-cloud-dataplex = "^1.x.x" # (or whichever version constraints fit the project)
```
Adding this to the base requirements should fix the issue for future users following the tutorial.
It would be great if we could fix it to avoid the same error for others (in case it appears).
Cheers,
Mario
Contributor guide
Assessment
This issue has not been assessed yet.