fix(cli): fail unified deploy on function errors - #618
Open
base44-os-gremlins[bot] wants to merge 1 commit into
Open
fix(cli): fail unified deploy on function errors#618base44-os-gremlins[bot] wants to merge 1 commit into
base44-os-gremlins[bot] wants to merge 1 commit into
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.14-pr.618.6b8b5cfPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.14-pr.618.6b8b5cf"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.14-pr.618.6b8b5cf"
}
}
Preview published to npm registry — try new features instantly! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
The unified
base44 deploycommand reported "App deployed successfully" and exited0even when individual function deployments failed, so CI pipelines treated partially broken deploys as green. This PR threads the per-function deployment results back out ofdeployAll()and makes thedeploycommand warn and exit with code1when 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 theCLIExitError(1)convention already used bybase44 functions deploy.Related Issue
Supersedes the stale/conflicted PR #501.
Type of Change
Changes Made
core/project/deploy.ts:DeployAllResultnow carriesfunctionResults: SingleFunctionDeployResult[], populated fromdeployFunctionsSequentially()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, countfunctionResultsentries withstatus === "error"; if any,log.warna pluralized"N function(s) failed to deploy"and throwCLIExitError(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
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional 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.ts20 passed, plustypecheckandlintclean; the full suite had 2 unrelateddev.spec.tsfailures that also reproduce on cleanmain, hence the unchecked box above. Nodocs/updates were needed — this is a behavioral fix within the existing unified-deploy architecture.🤖 Generated by Claude | 2026-09-10 09:53 UTC | 6b8b5cf