Local deployment template requires ADC and Cloud Logging at import time
还没有人认领这个 Issue。
评估
调研方向
生成一个 deployment_target: none 的 ADK 项目,然后检查 app/fast_api_app.py,并在没有 Application Default Credentials 的隔离环境中导入它。跟踪 --otel-to-cloud 入口点和子环境处理逻辑,然后运行报告的回归测试套件;完成的标准是本地启动不需要 ADC 或 Cloud Logging,同时精确的 opt-in 传播和现有的 fallback 行为仍得到覆盖。
由索引模型根据 Issue 内容生成。
描述
Baseline
Reproduced from v1.3.1 at 5a306f8956cb1eeae69f9709de0e4d61b44e11e7.
Reproduction
- Generate an ADK project with
deployment_target: none. - Use an isolated local environment without Application Default Credentials.
- Import or start the generated
app/fast_api_app.py.
The generated module unconditionally calls google.auth.default(), constructs google.cloud.logging.Client(), and always sets otel_to_cloud=True.
Actual behavior
A local-only template needs cloud credentials and a Cloud Logging dependency merely to import/start. This makes the none target fail in a normal offline/no-ADC development environment.
Expected behavior
The local target should use Python stdlib logging and start without ADC. Existing cloud OTEL behavior should remain opt-in through the public --otel-to-cloud flag only.
Minimal fix
- use
logging.getLogger(__name__)in the local template and remove its Cloud Logging dependency; - pass a private child-only
AGENTS_CLI_OTEL_TO_CLOUD=1value only when--otel-to-cloudis explicitly set; - remove any inherited copy of that private variable when the option is off;
- read the private flag before loading project
.envfiles, accepting only the exact value1.
Reference implementation: https://github.com/benagentai93-dot/agents-cli/commit/d888f8db85d05e7bb4ed92c711045a246c00b537
Test evidence
Runnable regressions cover dependency output, import without ADC, exact opt-in behavior, inherited-environment removal, explicit child propagation, and the existing ADK fallback flag.
Fork verification on Python 3.11/3.13:
- focused Batch 1 suite: 17 passed
- full root suite: 19 passed
- lint, type check, build, and installed-wheel smoke: passed
- 主要语言
- Python
- 星标
- 6k
- 派生
- 670
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/agents-cli 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 92/100
google/agents-cli#86 ·
-
google/agents-cli#91 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 68/100
google/agents-cli#85 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
google/agents-cli#84 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 72/100
google/agents-cli#83 · 2 条评论 · 1 个 reaction ·
查看 google/agents-cli 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100