Skip to content

fix(studio): 稳定 Runtime Ready 后的连接探测 - #772

Merged
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/runtime-ready-studio-proxy
Jul 29, 2026
Merged

fix(studio): 稳定 Runtime Ready 后的连接探测#772
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/runtime-ready-studio-proxy

Conversation

@FirstayZheng

@FirstayZheng FirstayZheng commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

背景

Studio 部署 AgentKit Runtime 后,后端轮询任务状态已经显示 Runtime Ready,但前端进入智能体详情或自动连接 Runtime 时,偶发出现连接失败。用户看到的是部署流程已经结束,但 Studio 仍提示无法连接或部署失败,容易误判为创建链路失败。

这个问题影响的是部署后的主干链路:创建 Runtime -> Runtime Ready -> Studio 读取 Runtime 内应用列表 / Agent 信息 / 会话列表。

遇到的问题

排查时看到几类现象:

  • Runtime 状态已 Ready,但紧接着访问 /list-apps/web/agent-info/*GET /apps/*/users/*/sessions 时,Runtime 入口可能短时间 DNS/连接失败。
  • 私网 Runtime 在 Studio 后端不具备对应 VPC/DNS 访问能力时,后端只返回泛化的 502,前端无法给出可理解的错误说明。
  • 现有日志没有打印 Runtime metadata、选中的 endpoint、network type、auth type 和 upstream 访问结果,导致很难判断是 Runtime 未就绪、endpoint 选择、DNS、VPC 还是鉴权问题。

修复内容

  • 在 Runtime proxy 中增加 Runtime metadata / endpoint / network type / auth type / upstream request-response 日志,方便定位部署后连接问题。
  • 对部署后最关键且安全的 GET 探测请求增加短期重试:
    • /list-apps
    • /web/agent-info/*
    • /apps/*/users/*/sessions
  • 对私网 Runtime endpoint 连接失败返回更明确的错误码,前端展示中文提示:当前 Studio 无法访问私网 Runtime,需要使用绑定相同 VPC 的 Studio,或改用公网 / 公网+VPC 部署。
  • 保持非探测请求不重试,避免对有副作用请求引入重复提交风险。

范围

  • 只修复 Runtime Ready 后 Studio 连接 Runtime 的稳定性和错误提示。
  • 不包含 TLS-only 部署失败修复。
  • 不包含临时将生成 Runtime 的 requirements.txt 指向分支包的验证改动。

验证

  • python3 -m pre_commit run --from-ref upstream/main --to-ref HEAD
  • python3 -m py_compile veadk/cli/cli_frontend.py
  • npm test
  • npm run build

Base

基于最新 main,当前 main 已包含 #766

@FirstayZheng FirstayZheng changed the title fix(studio): stabilize runtime readiness probes fix(studio): 稳定 Runtime Ready 后的连接探测 Jul 29, 2026
@yaozheng-fang
yaozheng-fang merged commit b13179a into volcengine:main Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants