Fix Aliyun FC runtime provisioning - #69
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bd2c1ec5d
ℹ️ 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".
| 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.
Restore SDK install for Aliyun source runtimes
When the built-in Aliyun deploy path is used, it packages infra/vefaas/runtime-app as a source zip and passes this env to the new function. That package's run.sh only installs requirements.txt when MAPLE_SKIP_CLAUDE_AGENT_SDK_INSTALL is not true, but the default anthropic_claude_code runtime path in app.py still requires import claude_agent_sdk; with the default source package there is no vendored SDK, so newly provisioned Aliyun FC runtime workspaces fail on the first agent run unless every agent is forced to a non-SDK protocol or a pre-baked source is supplied.
Useful? React with 👍 / 👎.
| aliyunCreds.ALIYUN_FC_INVOKE_URL ?? | ||
| aliyunCreds.invoke_url ?? | ||
| aliyunCreds.invokeUrl ?? | ||
| sandboxPools.find((pool) => pool.provider === "aliyun_fc" && String(asRecord(pool.config).invoke_url ?? "").trim())?.config?.invoke_url ?? |
There was a problem hiding this comment.
Require credentials for the selected Aliyun sandbox pool
This treats an invoke_url on any Aliyun sandbox pool as satisfying the credential requirement for all Aliyun FC sandbox usage. If the selected/primary Aliyun pool has no config.invoke_url but a standby Aliyun pool does, validation passes without AK/SK; later workspaceSandboxRuntimeConfig() uses the selected provider's first pool config and ensureAliyunFcSandboxProviderReady() attempts lazy deployment with empty credentials, so workspace provisioning fails instead of returning provider_credentials_required.
Useful? React with 👍 / 👎.
Summary
Verification
Cloud cleanup