fix(task) #35 FileFetchTask no longer ignores write failures - #36
Merged
Merged
Conversation
…estination storage: the error is thrown and, with remove_source, the source file is no longer deleted Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks
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.
Description
Fixes #35.
FileFetchTaskcaught and discarded theFilesystemExceptionthrown when writing to the destination storage: the process succeeded, the file name was output as if the copy had worked and, withremove_source: true, the source file was deleted although it was never copied.FileFetchTask::doFileCopy(): a write failure is no longer caught, so the task fails and itserror_strategyapplies; the source is deleted only after a successful write; the read stream is always closed (finally)FileFetchTaskTest(new): a successful copy withremove_sourcedeletes the source and outputs the file name; a write failure throwsUnableToWriteFile, keeps the source and outputs nothing (fails without the fix)file_fetch_task.md: document the write failure behaviourChecked with
demo.flysystem.fetch_write_failurein process-bundle-demo: the process now fails withUnable to write file ... Is a directoryand the source file is kept (it succeeded and deleted the source before).Requirements
Breaking changes
A write failure now fails the task (with the default
stopstrategy, the process fails) instead of being silently ignored.🤖 Generated with Claude Code