Repository navigation
fix(engine): fail the node when its artifacts cannot be saved - #1199
Closed
pcbeingused333 wants to merge 1 commit into
Closed
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
Node completion wrote outcome and artifacts with updateRun, which drops the store error, then emitted artifact.published. When the store rejected the write (for example an artifact larger than the MySQL TEXT column) the node stayed running and downstream nodes never started. Use updateRunErr and fail the node on a rejected write, as the SOP node already does.
Author
|
#1301 has landed on main and covers this: a rejected outcome write now settles the node with the store error, |
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.
Fixes #1092
What changed
When the store rejects a node's outcome write (the reported case: a required artifact larger than 64 KiB on MySQL, where
run_artifacts.contentistext), the node now fails with the store error instead of stayingrunning, andartifact.publishedis no longer emitted for an artifact that was never saved.Root cause: in
internal/engine/node_execute.gothe completion path saved the outcome and artifacts withe.updateRun(...), which logs and drops the store error, and then emittedartifact.publishedunconditionally. The SOP node path already usesupdateRunErrplusnodeFailedAtfor this.Fix: use
updateRunErrfor the completion write. If the store rejects it, fail the node (保存节点产物失败:<store error>) through the existingfailNodepath, so retries and failure edges behave as for any other node failure, and skip theartifact.publishedevents.Not changed here: widening
run_artifacts.contenttoMEDIUMTEXTon MySQL (new schema plus a migration for existing databases) would let this artifact size be archived at all. That is a schema decision for the maintainers; happy to send it as a separate PR if wanted.Scope
Compatibility
Platform engine only. No schema, API or migration change. A node whose outcome cannot be stored now ends
failed(retryable through the usual attempts/failure edges) instead of hanging inrunning.Validation
TestScriptNodeArtifactWriteFailureFailsNodemakes the store reject the artifact insert for a script node (SQLite trigger). Without the fix the run staysrunning; with it the node isfailedwith the store error and noartifact.publishedevent is emitted.Not run: the full
go test -p=2 ./...,go vet ./..., thelocal/scripts and the browser suites (nolocal/or UI changes). Not reproduced against a real MySQL instance.Safety
This pull request was prepared with the assistance of an AI coding agent (Claude Code) and submitted by Alex Castillo, who is responsible for its content.