fix(function): omit oversized display code instead of failing the execution - #8357
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
This branch was previously deployed
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.
Summary
sourceCodeat the 1 MiB source limit.sourceCodeisn't the code that runs. It's the display copy used only to render errors, and the resolver inlines each referenced block output into it in full, while the executed code carries those values as__blockRef_Nbindings. A Function block that references a large upstream output (e.g.data = <api.data>over ~1 MiB, which Python and shell never offload) therefore produced a request the route rejected, although its executed code was tiny. That same workflow runs on mainbuildFunctionExecuteBodynow omitssourceCodewhen it exceedsMAX_FUNCTION_CODE_LENGTH. Error rendering already falls back to the executed code whensourceCodeis absent, which keeps line numbers correct; truncating would misplace them. The route keeps fix(execution): bound reference and context processing #8344's bound on both fields, and the cap on the executedcodeis unchangedType of Change
Testing
execute.test.tscase: a body whose display code outgrows the cap passes the realfunctionExecuteBodySchemaand carries nosourceCode, and display code within the cap is still sent. It fails on staging (safeParse(...).success === false)check:auditspassChecklist