Add Aliyun managed provider support - #68
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd6f2b5a5d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| export async function ensureAliyunFcSandboxProviderReady(workspaceId: string, config: AliyunFcSandboxConfig): Promise<AliyunFcSandboxConfig> { | ||
| if (config.invoke_url) return config; | ||
| const deployScript = process.env.MAPLE_ALIYUN_FC_SANDBOX_DEPLOY_SCRIPT || process.env.MAPLE_ALIYUN_FC_RUNTIME_DEPLOY_SCRIPT || "infra/aliyun/deploy_aliyun_fc_runtime.mjs"; |
There was a problem hiding this comment.
Allow managed Aliyun sandboxes past validation
With this default deploy script, an Aliyun FC sandbox no longer needs a pre-existing invoke_url, but the workspace creation path still rejects any Aliyun sandbox/pool that lacks ALIYUN_FC_INVOKE_URL in missingWorkspaceProvisioningCredentials (apps/control-plane-api/src/routes/workspaceRoutes.ts:286-292). In the normal API/UI onboarding flow with only Aliyun credentials, this new branch is never reached, so managed sandbox deployment cannot be used unless users manually edit the workspace config or pre-create a function URL.
Useful? React with 👍 / 👎.
| instanceConcurrency: Math.max(1, Math.floor(numberValue(args.instanceConcurrency ?? env.MAPLE_RUNTIME_FUNCTION_MAX_CONCURRENCY ?? env.MAPLE_ALIYUN_FC_INSTANCE_CONCURRENCY, 20))), | ||
| reservedConcurrency: optionalInteger(args.reservedConcurrency ?? env.MAPLE_ALIYUN_FC_RESERVED_CONCURRENCY), |
There was a problem hiding this comment.
Honor Aliyun pool instance caps
Runtime pool provisioning now passes MAPLE_RUNTIME_FUNCTION_MAX_INSTANCES into the default Aliyun deploy script, but resolveDeployConfig only consumes MAPLE_RUNTIME_FUNCTION_MAX_CONCURRENCY (per-instance concurrency) and MAPLE_ALIYUN_FC_RESERVED_CONCURRENCY. For a workspace pool configured with max_instances_per_function: 1, the default script creates an uncapped FC function, so the pool's scaling/cost cap is silently ignored.
Useful? React with 👍 / 👎.
Summary
Verification
Cleanup