spec.source_code_spec.inline_source.source_archive` cannot be empty
** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.
Describe the bug when deploying adk to adk deploy agent_engine using "adk deploy agent_engine" and trying to Enable instrumentation of OpenTelemetry traces and logs I get the error spec.source_code_spec.inline_source.source_archive` cannot be empty
To Reproduce Please share a minimal code and data to reproduce your problem. Steps to reproduce the behavior:
- adk deploy agent_engine myagent --trace_to_cloud
- try to Enable instrumentation of OpenTelemetry traces and logs using the Service configuration panel in the GCP console
- Press update
Expected behavior Telemetry collection enabled
Screenshots
Desktop (please complete the following information):
- OS: macOS
- Python version(python -V): 3.13.2
- ADK version(pip show google-adk): 1.18.0
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-2.5-fals
Additional context Add any other context about the problem here.
I see the same. Can you confirm that your Cloud Storage bucket is also empty? My "adk deploy agent_engine" command ignores whatever I put in the storage bucket parameter, and it seems those Agent Engine UI settings expect an archive URI.
Same error here while using the agent-starter-pack
@postak This issue occurs because the Agent Engine deployment in cli_deploy.py:635-923 uses source-based deployment with local file paths but doesn't populate the source_archive field that the API expects.
When you try to update OpenTelemetry configuration in the GCP console,the API validates and finds this field empty.
As a workaround, deploy with --trace_to_cloud from the start and avoid modifying configuration via GCP console afterward.
Any configuration changes should be done by redeploying with ADK CLI.
The fix requires uploading the source code to GCS (using --staging_bucket) and setting agent_config['source_code_spec']['inline_source']['source_archive'] to the GCS URI before calling the API.
This issue is still present in v1.21.0.
@yeesian Please have a look into it.
I checked current main (7d3658e), and adk deploy agent_engine now uses client.runtimes.create/update with source packages and a Dockerfile. staging_bucket is deprecated and no longer used, so the older proposal to upload an archive through that option would not fit the current deployment path.
Has the empty source_archive error been reproduced with this runtime deployment path? I can help with a focused fix, but I would first like to confirm whether ADK or the runtime SDK is responsible for populating that field. I have not verified the console update on a live GCP deployment.