-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Aliyun FC runtime provisioning #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,7 +143,8 @@ async function directAliyunFcRuntimeProvisioning(workspaceId: string, index: num | |
| const configuredInvokeUrl = String(process.env.MAPLE_ALIYUN_FC_INVOKE_URL || defaults.aliyun_fc.invoke_url || ""); | ||
| const deployScript = process.env.MAPLE_ALIYUN_FC_RUNTIME_DEPLOY_SCRIPT || (configuredInvokeUrl ? "" : "infra/aliyun/deploy_aliyun_fc_runtime.mjs"); | ||
| const configuredFunctionName = String(process.env.MAPLE_ALIYUN_FC_FUNCTION_NAME || defaults.aliyun_fc.function_name || functionName); | ||
| const envs = publicRuntimePoolMemberEnvs(runtimePoolMemberEnvs(defaults.aliyun_fc.envs, workspaceId, index, "managed-agents-platform-aliyun-fc")); | ||
| const aliyunRuntimeBaseEnvs = { MAPLE_SKIP_CLAUDE_AGENT_SDK_INSTALL: "true", ...defaults.aliyun_fc.envs }; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the built-in Aliyun deploy path is used, it packages Useful? React with 👍 / 👎. |
||
| const envs = publicRuntimePoolMemberEnvs(runtimePoolMemberEnvs(aliyunRuntimeBaseEnvs, workspaceId, index, "managed-agents-platform-aliyun-fc")); | ||
| if (!deployScript) { | ||
| if (!configuredInvokeUrl) throw new Error("workspace runtime pool Aliyun FC provisioning requires MAPLE_ALIYUN_FC_RUNTIME_DEPLOY_SCRIPT or MAPLE_ALIYUN_FC_INVOKE_URL."); | ||
| return { | ||
|
|
@@ -175,7 +176,7 @@ async function directAliyunFcRuntimeProvisioning(workspaceId: string, index: num | |
| MAPLE_RUNTIME_FUNCTION_MAX_CONCURRENCY: String(poolConfig.max_concurrency_per_instance), | ||
| MAPLE_ALIYUN_FC_RUNTIME_ENVS: JSON.stringify({ | ||
| ...runtimeEnvOverrides(process.env.MAPLE_ALIYUN_FC_RUNTIME_ENVS), | ||
| ...runtimePoolMemberEnvs(defaults.aliyun_fc.envs, workspaceId, index, "managed-agents-platform-aliyun-fc"), | ||
| ...runtimePoolMemberEnvs(aliyunRuntimeBaseEnvs, workspaceId, index, "managed-agents-platform-aliyun-fc"), | ||
| MAPLE_RUNTIME_FUNCTION_MEMORY_MB: String(poolConfig.memory_mb), | ||
| MAPLE_RUNTIME_FUNCTION_MIN_INSTANCES: String(poolConfig.min_instances_per_function), | ||
| MAPLE_RUNTIME_FUNCTION_MAX_INSTANCES: String(poolConfig.max_instances_per_function), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This treats an
invoke_urlon any Aliyun sandbox pool as satisfying the credential requirement for all Aliyun FC sandbox usage. If the selected/primary Aliyun pool has noconfig.invoke_urlbut a standby Aliyun pool does, validation passes without AK/SK; laterworkspaceSandboxRuntimeConfig()uses the selected provider's first pool config andensureAliyunFcSandboxProviderReady()attempts lazy deployment with empty credentials, so workspace provisioning fails instead of returningprovider_credentials_required.Useful? React with 👍 / 👎.