Skip to content

fix(task) #35 FileFetchTask no longer ignores write failures - #36

Merged
njoubert-cleverage merged 1 commit into
mainfrom
35
Sep 30, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
35

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #35.

FileFetchTask caught and discarded the FilesystemException thrown when writing to the destination storage: the process succeeded, the file name was output as if the copy had worked and, with remove_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 its error_strategy applies; the source is deleted only after a successful write; the read stream is always closed (finally)
  • FileFetchTaskTest (new): a successful copy with remove_source deletes the source and outputs the file name; a write failure throws UnableToWriteFile, keeps the source and outputs nothing (fails without the fix)
  • file_fetch_task.md: document the write failure behaviour

Checked with demo.flysystem.fetch_write_failure in process-bundle-demo: the process now fails with Unable to write file ... Is a directory and the source file is kept (it succeeded and deleted the source before).

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

A write failure now fails the task (with the default stop strategy, the process fails) instead of being silently ignored.

🤖 Generated with Claude Code

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FileFetchTask ignores write failures and deletes the source file with remove_source

1 participant