Skip to content

fix(functions): print server warnings from function deploys - #690

Merged
Paveltarno merged 2 commits into
base44:mainfrom
ittaiz:fix/dev3-surface-function-deploy-warnings
Nov 3, 2026
Merged

Paveltarno merged 2 commits into
base44:mainfrom
ittaiz:fix/dev3-surface-function-deploy-warnings

Conversation

@ittaiz

@ittaiz ittaiz commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Since apper #35392 (Oct 28) the server no longer creates new automations declared in function.jsonc. It deploys the code and says so in the deploy response's warnings:

{ "status": "deployed", "warnings": ["myFn: automations not created (nightly) and none removed. ..."] }

The CLI parsed that response as z.object({ status }), so Zod stripped warnings and base44 deploy / base44 functions deploy just printed "deployed". The server's private-data-source deploy warnings were dropped the same way. The CLI hit this on a real app. Slack thread

Fix

  • DeploySingleFunctionResponseSchema keeps warnings (default []), matching DeployActorResponseSchema. The server sends it on both the deployed and unchanged paths.
  • SingleFunctionDeployResult carries the warnings.
  • formatDeployResult prints each warning with log.warn under the result line. That function is already shared by function and actor results, so the two hand-written actor warning loops (deploy, actors deploy) are gone and both resource types use one path.
  • The automation warning already starts with "<function>: ", so the name is added only when a warning doesn't start with it. Otherwise it would print myFn: myFn: .... Actor output doesn't change.

Under --json the warnings go to stderr through the logger, like actor warnings do today.

Tests

  • functions deploy: warnings are printed for deployed and unchanged, an already-prefixed warning isn't prefixed again, and an unprefixed one gets the function name.
  • deploy: function warnings are printed during the unified deploy.
  • With the schema change reverted, all three new tests fail.
  • bun run typecheck and bun run lint pass. The full suite passes except dev.spec.ts › Deno fallback runtime, which needs deno on PATH and fails locally without this change too.

🤖 Generated with Claude Code

Since apper #35392 the server no longer creates new automations declared in
function.jsonc and reports that in the deploy response's `warnings`. The CLI
parsed the response as `{ status }`, so the warning (and the private data
source warnings) were dropped and deploy just printed "deployed".

Keep `warnings` in DeploySingleFunctionResponseSchema, carry it on the deploy
result, and print it from formatDeployResult, which now also handles actor
warnings for both `deploy` and `actors deploy`.
@Paveltarno
Paveltarno enabled auto-merge (squash) November 3, 2026 11:43
@Paveltarno
Paveltarno disabled auto-merge November 3, 2026 11:58
@Paveltarno
Paveltarno enabled auto-merge (squash) November 3, 2026 11:58
@Paveltarno
Paveltarno merged commit 0f99473 into base44:main Nov 3, 2026
11 of 14 checks passed
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