Open
fix(server/flux): initialize async TLS channels with shared gRPC credentials #12
fix(server/flux): initialize async TLS channels with shared gRPC credentials #12
Open
任我飞Add on 2 days ago
任我飞
任我飞
2 days ago

Summary

When [flux_sandbox] use_tls = true, the first asynchronous lifecycle operation fails before issuing its RPC: _ensure_channel() calls grpc.aio.ssl_channel_credentials(), which does not exist. With the locked grpcio 1.82.1 dependency this raises AttributeError. The synchronous provider already uses the correct shared credentials factory.

Use grpc.ssl_channel_credentials() with grpc.aio.secure_channel(). Preserve lazy initialization, channel reuse, timeout/auth settings and the plaintext path. Add regression coverage for real synchronous/asynchronous channel initialization with TLS enabled and disabled, and document the existing Flux TLS option.

This issue was found in the current GitCode branch, with no linked Issue. All 11 historical GitCode PRs were checked by title, with discussion pages and current file history reviewed. Publication-time API checks found no open PRs or prior contributions by this account. Some historical web discussions are collapsed, so this is not an exhaustive check of all inline comments or off-platform work.

Testing

From server/, with project dependencies prepared:

PYTHONPATH=. python -m pytest tests/test_flux_sandbox_provider.py tests/test_flux_snapshot_runtime.py tests/test_runtime_resolver.py -q
python -m ruff check opensandbox_server/services/flux/flux_sandbox_provider.py tests/test_flux_sandbox_provider.py

Environment: Python 3.11.9; runtime/test dependencies constrained to server/uv.lock versions through pip in an isolated environment because uv was unavailable. No lockfile or dependency declaration changes. Tests construct real gRPC channels and stubs but do not establish a TLS handshake or invoke a live controller. Existing pause/resume tests mock RPC methods. The full server suite, deployment and GitCode CI have not been run. Existing dependency deprecation warnings remain.

Breaking Changes

Checklist

likedislike
Merge blocked
openFuyao-botopenFuyao-botCollaborators
2 days ago Added label: sig/sig-agent-sandbox
openFuyao-bot
openFuyao-botCollaborators
2 days ago Comments:

欢迎来到 openFuyao 社区

Hey @renwofei423 , 感谢你对社区的贡献.

机器人使用手册

有关指令的使用,可以点击 此处 查看详情。开发人员可以在每个PR或Issue下方评论特定指令来触发机器人任务。您可以自助配置此仓库的 PR 合并规则,更多详情,请参阅此处。

联系指引

有疑问可以联系 SIG: sig-agent-sandbox ,
维护者是: @Gao-Pan, @fisher789, @ruanhanqing, @wwthw, @zbbbc, @zjw6 ,
审核者是: @Gao-Pan, @fisher789, @ruanhanqing, @wwthw, @zbbbc, @zjw6 .

likedislike
openFuyao-botopenFuyao-botCollaborators
2 days ago Added label: openFuyao-cla/yes
openFuyao-bot
openFuyao-botCollaborators
2 days ago Comments:

CLA 签署成功

renwofei423, 感谢您的代码贡献。 所有的代码贡献者都已完成了 CLA 签署。 👍

likedislike
openFuyao-botopenFuyao-botCollaborators
2 days ago Added label: ci-running
openFuyao-botopenFuyao-botCollaborators
2 days ago Removed label: ci-running
openFuyao-botopenFuyao-botCollaborators
2 days ago Added label: ci-successful