Skip to content

fix(cli): fail unified deploy on function errors - #618

Open
base44-os-gremlins[bot] wants to merge 1 commit into
mainfrom
codex/fix-deploy-function-exit-status
Open

fix(cli): fail unified deploy on function errors#618
base44-os-gremlins[bot] wants to merge 1 commit into
mainfrom
codex/fix-deploy-function-exit-status

Conversation

@base44-os-gremlins

@base44-os-gremlins base44-os-gremlins Bot commented Sep 10, 2026

Copy link
Copy Markdown

Note

Description

The unified base44 deploy command reported "App deployed successfully" and exited 0 even when individual function deployments failed, so CI pipelines treated partially broken deploys as green. This PR threads the per-function deployment results back out of deployAll() and makes the deploy command warn and exit with code 1 when any function fails. Sequential partial deployment is preserved — remaining functions are still attempted after a failure — and connector authorization plus Dashboard/App URL output still run before the failing exit, matching the CLIExitError(1) convention already used by base44 functions deploy.

Related Issue

Supersedes the stale/conflicted PR #501.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • core/project/deploy.ts: DeployAllResult now carries functionResults: SingleFunctionDeployResult[], populated from deployFunctionsSequentially() and returned on both the site and no-site code paths.
  • cli/commands/project/deploy.ts: after connector post-deploy flows and the Dashboard/App URL output, count functionResults entries with status === "error"; if any, log.warn a pluralized "N function(s) failed to deploy" and throw CLIExitError(1) instead of returning the success outro.
  • tests/cli/deploy.spec.ts: three new integration tests covering the single-function failure exit code, that all four zero-config functions are still attempted after the first one fails, and that pending connector authorization plus Dashboard output are handled before the failure exit.

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated docs/ (AGENTS.md) if I made architectural changes

Additional Notes

Behavior change worth calling out: a deploy where some functions fail now exits non-zero, so scripts that previously ignored the exit code will start failing — which is the intent. Per-function errors are still surfaced via formatDeployResult, and non-function resources (entities, agents, connectors, site) are unaffected. Reported local runs: tests/cli/deploy.spec.ts 20 passed, plus typecheck and lint clean; the full suite had 2 unrelated dev.spec.ts failures that also reproduce on clean main, hence the unchecked box above. No docs/ updates were needed — this is a behavioral fix within the existing unified-deploy architecture.


🤖 Generated by Claude | 2026-09-10 09:53 UTC | 6b8b5cf

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.1.14-pr.618.6b8b5cf

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.1.14-pr.618.6b8b5cf"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.1.14-pr.618.6b8b5cf"
  }
}

Preview published to npm registry — try new features instantly!

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.

1 participant