fix(cli): lazy-import GCS deps so adk web works without google-cloud-storage#5788
fix(cli): lazy-import GCS deps so adk web works without google-cloud-storage#5788mangod12 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Response from ADK Triaging Agent Hello @mangod12, thank you for creating this pull request! We noticed that the Contributor License Agreement (CLA) check is currently failing. Per our Contribution Guidelines, all contributions must be accompanied by a signed Google CLA. Could you please visit https://cla.developers.google.com/ to verify/sign the agreement so that our team can review and accept your contribution? Thank you for your help in keeping our project compliant! |
08387d2 to
ceaa865
Compare
|
I have already signed the Google CLA (verified passing on PR #5736 with the same email). Please re-check. |
…d-storage The `DevServer` import chain unconditionally imported `gcs_eval_set_results_manager` and `gcs_eval_sets_manager` at module level, which require `google-cloud-storage`. This caused `adk web` to silently fall back to `ApiServer` on a fresh `pip install google-adk`, leaving the dev UI unreachable. Fix: move GCS imports behind `TYPE_CHECKING` for type annotations and lazy-import inside `create_gcs_eval_managers_from_uri()` where they are actually needed. Also add `python-multipart` to core dependencies since it is required for Builder UI endpoints in `adk web`. Fixes google#5787 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ceaa865 to
0f4454e
Compare
|
@googlebot I signed it! |
Summary
google.adk.cli.utils.evalssoDevServerimports successfully withoutgoogle-cloud-storageinstalledpython-multipartto core dependencies since it's required for Builder UI endpoints inadk webRoot cause
evals.pyunconditionally importsGcsEvalSetResultsManagerandGcsEvalSetsManagerat module level. These modules importgoogle.cloud.storage, which is only declared under[gcp]/[all]/[test]extras. Sincedev_server.pyimportsevals, a freshpip install google-adkcausesDevServerto fail to import, silently falling back toApiServer— leaving the dev UI at/dev-ui/unreachable (404).Changes
src/google/adk/cli/utils/evals.py— moved GCS imports behindTYPE_CHECKINGfor annotations and lazy-import insidecreate_gcs_eval_managers_from_uri()where they're actually neededpyproject.toml— addedpython-multipart>=0.0.9to core dependenciestests/unittests/cli/utils/test_evals.py— updated mock paths and added regression test verifying GCS classes are not in module namespace at runtimeTest plan
test_evals.pypass (existing + new regression test)from google.adk.cli.dev_server import DevServersucceedsfast_api.py(lines 519-531) forDevServeritselfFixes #5787
🤖 Generated with Claude Code