Skip to content

Fix Aliyun FC runtime provisioning - #69

Merged
dragonforce2010 merged 1 commit into
mainfrom
codex/aliyun-fc-session-proof
Jun 23, 2026
Merged

Fix Aliyun FC runtime provisioning#69
dragonforce2010 merged 1 commit into
mainfrom
codex/aliyun-fc-session-proof

Conversation

@dragonforce2010

Copy link
Copy Markdown
Owner

Summary

  • allow Aliyun FC sandbox provisioning with AK/SK lazy deploy instead of requiring a pre-created invoke URL
  • bundle the Aliyun FC deploy script into the cloud backend package and fix Aliyun SDK constructor interop after bundling
  • pass agent loop env into FC runtimes and skip Python SDK pip install for Aliyun source runtimes
  • add contract coverage for Aliyun lazy provisioning and SDK client construction

Verification

  • bun run test:aliyun-fc-deploy
  • bun run typecheck
  • python3 -m py_compile infra/vefaas/deploy_vefaas_application.py
  • source /Users/bytedance/workspace/open-maple/.env && bun run test:aliyun-provider-orchestration
  • source /Users/bytedance/workspace/open-maple/.env && bun run test:tenant-cloud-provider
  • stable cloud deployed and real Aliyun FC runtime+sandbox session verified; screenshot saved at /Users/bytedance/.codex/worktrees/b0ac/open-maple/aliyun-fc-session-proof.png

Cloud cleanup

  • deleted Aliyun FC function maple-ws-wssg-eccywve-1-1782227735973
  • deleted Aliyun FC function maple-sbx-wssg-eccywve-1782227738774
  • deleted Aliyun FC function maple-sbx-wssg-eccywve-1782227738828
  • status recheck returned FunctionNotFound for all three

@dragonforce2010
dragonforce2010 merged commit 35aa187 into main Jun 23, 2026
2 checks passed
@dragonforce2010
dragonforce2010 deleted the codex/aliyun-fc-session-proof branch June 23, 2026 16:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 ??

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants