Skip to content

Fix veFaaS deploy bundle proxy-agent resolution - #66

Merged
dragonforce2010 merged 1 commit into
mainfrom
codex/fix-vefaas-proxy-agent-deploy
Jun 22, 2026
Merged

Fix veFaaS deploy bundle proxy-agent resolution#66
dragonforce2010 merged 1 commit into
mainfrom
codex/fix-vefaas-proxy-agent-deploy

Conversation

@dragonforce2010

Copy link
Copy Markdown
Owner

Summary

  • keep proxy-agent external for veFaaS backend Bun bundles
  • reuse the backend build flag list for API and MySQL worker bundles

Verification

  • rtk bun build --target=node --packages=bundle --external=proxy-agent --outfile /tmp/openmaple-vefaas-app.js apps/control-plane-api/src/index.ts
  • rtk bun build --target=node --packages=bundle --external=proxy-agent --outfile /tmp/openmaple-vefaas-mysql-child.mjs apps/control-plane-api/src/infra/mysql_child.mjs
  • rtk bun build --target=node --packages=bundle --external=proxy-agent --outfile /tmp/openmaple-vefaas-mysql-worker.mjs apps/control-plane-api/src/infra/mysql_worker.mjs
  • rtk python3 -m py_compile infra/vefaas/deploy_vefaas_application.py
  • rtk git diff --check

Note: this addresses the current main Cloud Deploy failure where Bun could not resolve urllib's optional peer dependency: proxy-agent.

@dragonforce2010
dragonforce2010 merged commit b7a4539 into main Jun 22, 2026
2 checks passed
@dragonforce2010
dragonforce2010 deleted the codex/fix-vefaas-proxy-agent-deploy branch June 22, 2026 18:48

@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: d6e56e5ff0

ℹ️ 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".

run([BUN, "build", "--target=node", "--packages=bundle", "--outfile", str(package_dir / "app.js"), str(ROOT / "apps/control-plane-api/src/index.ts")])
run([BUN, "build", "--target=node", "--packages=bundle", "--outfile", str(package_dir / "mysql_child.mjs"), str(ROOT / "apps/control-plane-api/src/infra/mysql_child.mjs")])
run([BUN, "build", "--target=node", "--packages=bundle", "--outfile", str(package_dir / "mysql_worker.mjs"), str(ROOT / "apps/control-plane-api/src/infra/mysql_worker.mjs")])
backend_build = [BUN, "build", "--target=node", "--packages=bundle", "--external=proxy-agent"]

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 Ship proxy-agent when externalizing it

With --external=proxy-agent, Bun leaves a runtime require("proxy-agent") in the backend bundle instead of bundling that optional urllib peer. The veFaaS package this script uploads does not include node_modules and writes a root package.json containing only name/private before run.sh executes node app.js, so any proxy-enabled ali-oss/urllib path will fail in the deployed function with MODULE_NOT_FOUND for proxy-agent. Please either bundle/install proxy-agent in the uploaded backend package or avoid externalizing a dependency that may be required at runtime.

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