feat: add Alibaba Function Compute serverless runtime operator support #867
Open
insight-bit wants to merge 4 commits into
Open
feat: add Alibaba Function Compute serverless runtime operator support #867insight-bit wants to merge 4 commits into
insight-bit wants to merge 4 commits into
Conversation
14f3475 to
1376ccd
Compare
…support resolves alibaba#870 Add FC (Function Compute) Operator pattern support to ROCK framework. Components: - FCConfig: Service-level configuration (rock/config.py) - FCDeploymentConfig: API-level sandbox configuration (rock/deployments/config.py) - FCOperator: AbstractOperator implementation (rock/sandbox/operator/fc.py) - FCDeployment: WebSocket session management (rock/deployments/fc.py) - fc_rocklet: Container and Runtime deployment modes Deployment modes: - Container: custom-container runtime (recommended for production) - Runtime: custom.debian12 runtime Both configured with SESSION_EXCLUSIVE mode and x-rock-session-id header affinity. Test coverage: - test_fc_deployment.py: Config validation, lifecycle tests - test_fc_e2e.py: E2E HTTP/WebSocket tests - test_fc_rocklet_runtimes.py: Runtime config validation Change-Id: I54e2de23c55d9b4c6641d6849330a300c3ad8632 Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1376ccd to
2f75e2d
Compare
resolves alibaba#870 Remove unnecessary FCDeployment abstraction layer. FC now uses direct Runtime management via FCOperator. Architecture: SandboxManager -> FCOperator -> FCRuntime -> FCSessionManager Changes: - Remove FCDeployment class - Add extended_params to FCDeploymentConfig - Move FCOperator to fc/ folder - Update tests Change-Id: Ie7861a7ef4d0521b906158c1e62ec8bece3414b0 Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolves alibaba#870 Move all FC-related configuration to Operator level: - Create FCOperatorConfig in rock/sandbox/operator/fc/config.py - Remove FCDeploymentConfig from rock/deployments/config.py - FC uses Operator pattern, not Deployment pattern Architecture: Deployment layer: DockerDeploymentConfig (for Docker/Ray/K8s) Operator layer: FCOperatorConfig (for FC) Changes: - FCOperatorConfig is Pydantic BaseModel, not DeploymentConfig - SandboxManager and DeploymentManager updated to use FCOperatorConfig - Tests updated to use FCOperatorConfig Change-Id: Ide0e4e1d1a6d4a6d5f4a97a8b40235b35d3b443a Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolves alibaba#870 Move FC function deployment configs from deployments/fc_rocklet to sandbox/operator/fc/runtime_example. This clarifies that: - runtime_example is FC platform deployment reference, not ROCK Deployment - FC-related code is now fully contained in sandbox/operator/fc/ directory Directory structure after move: rock/sandbox/operator/fc/ ├── __init__.py ├── config.py # FCOperatorConfig ├── operator.py # FCOperator └── runtime_example/ # FC function deployment reference ├── README.md ├── container/ # custom-container mode └── runtime/ # custom-runtime mode Change-Id: I8533f60930d0d799b187adce09288e6e2dd951ca Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generalwin
reviewed
Apr 27, 2026
| """FC session identifier (also serves as ROCK sandbox_id).""" | ||
|
|
||
| # FC connection settings | ||
| function_name: str | None = None |
Collaborator
There was a problem hiding this comment.
看上去是所有sandbox请求共用同一个fc 函数吗?那对于fc的实现来说,交付一个sandbox是交付的什么?函数、容器还是一个session?如果是session,是怎么保证多个sandbox之间的隔离的?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.