Skip to content

Fix runtime probe load in Agent directory - #788

Merged
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/agent-list-runtime-probe-performance
Jul 31, 2026
Merged

Fix runtime probe load in Agent directory#788
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/agent-list-runtime-probe-performance

Conversation

@FirstayZheng

Copy link
Copy Markdown
Contributor

背景

智能体列表页展示 Runtime 时,之前会在拿到控制面的 Runtime 列表后,对当前页里的每个 Runtime 并发调用 getRuntimeAgentInfo(),进一步触发 Runtime data plane 的 /list-apps / web/agent-info 探测。对于 private、不可达或不兼容 ADK Server 的 Runtime,这会产生大量失败请求和日志噪音,也会占用连接与等待时间。

同时,后端 runtime proxy 对 /list-appsweb/agent-info 等 readiness/probe 请求默认最多重试 10 次。private endpoint 在本地 Studio 环境下通常无法解析或无法连接,继续重试只会放大延迟。

做了什么

  • 智能体列表页只使用控制面 getRuntimes() 返回的信息渲染卡片,不再对每个 Runtime 批量调用 getRuntimeAgentInfo()
  • 将智能体列表页每页 Runtime 数量从 100 降到 24,降低首屏与滚动加载压力。
  • 前端 probeRuntimeApps() 增加显式 retryProbe 开关,默认不请求后端重试。
  • 只有用户主动连接 Runtime,或部署完成后自动连接 Runtime 时,才带上 probe_retry=connect,保留少量连接重试。
  • 后端 runtime proxy 调整 probe 策略:
    • 默认 probe 请求只尝试 1 次;
    • network_type=private 时 fail-fast,不重试;
    • 只有 probe_retry=connect 且非 private endpoint 时,最多尝试 3 次。
  • 转发到 Runtime 上游时会移除内部参数 probe_retry,避免泄漏给 Runtime 服务。
  • 增加/更新测试,覆盖 private fail-fast、public 主动连接少量重试、列表页不再批量 data-plane 探测等行为。

不在本 PR 范围内

本 PR 不修改详情页“已知 region 仍 fallback 到另一个 region”的行为,也不调整“连接失败后是否停留在详情页”的前端交互状态机。这些属于 #779 之后的详情页/连接交互策略,建议单独确认产品意图后另开 PR。

验证

  • npm run build
  • npm test(293 passed)
  • .venv/bin/python -m pytest tests/cli/test_frontend_runtime_proxy.py(10 passed)
  • .venv/bin/pre-commit run --all-files
  • git diff --check

@yaozheng-fang
yaozheng-fang merged commit 88c1105 into volcengine:main Jul 31, 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