adk deploy cloud_run fixes the Python version at 3.11, but some sample agents depend on Python 3.12.
Describe the bug
The data science agent from adk-samples depends on Python 3.12, but adk deploy cloud_run uses a hard-coded container template that uses Python 3.11. This leads to errors when the user runs the data science agent in a Cloud Run deployment. The specific error generated is a syntax error that results from changes in f-string parsing between 3.11 and 3.12.
To Reproduce Steps to reproduce the behavior:
- Install current versions of
adk-pythonandadk-samples. - Run
adk deploy cloud_runfor thedata-scienceagent. - Navigate to the web interface for the deployed agent.
- Type anything in the web interface.
- Get an error:
SyntaxError: unterminated string literal (detected at line 48)
Expected behavior Data science agent responds correctly.
Sample correct interaction: User: Hello, what can you do for me? Agent: Hello! I'm a data science and data analytics multi-agent system. I can help you with:
Querying databases: I can retrieve data from the forecasting_sticker_sales.test and forecasting_sticker_sales.train tables based on your questions. Data analysis: I can perform various data science tasks and Python analysis on the data. BigQuery ML: If you specifically ask for it, I can route your request to a BigQuery ML agent for tasks like model training, evaluation, or prediction. Just let me know what you'd like to do with your data!
A short term workaround is to search for python:3.11-slim in your adk installation, and replace it with python:3.12-slim or python:3.13-slim.
A longer term solution is allowing a user to set this in the cli. Working on that. But thought you might like the workaround earlier.