Skip to content

Always upload files that failed in the previous run#184

Merged
sb10 merged 2 commits into
developfrom
retry-failed-unchanged-fofn
Apr 29, 2026
Merged

Always upload files that failed in the previous run#184
sb10 merged 2 commits into
developfrom
retry-failed-unchanged-fofn

Conversation

@mjkw31

@mjkw31 mjkw31 commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mjkw31 mjkw31 requested a review from sb10 April 22, 2026 14:18
@sb10 sb10 requested a review from Copilot April 29, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the FOFN watcher/chunking workflow so that files which failed in the previous run are not treated as “unchanged” (and therefore will be included for upload again), even if their mtimes indicate they haven’t changed.

Changes:

  • Load the previous run’s status into subDir and use it during chunk generation to avoid skipping previously failed/missing uploads.
  • Switch report/status handling from raw status strings to transfer.RequestStatus (including fofn.ReportEntry.Status).
  • Add a lighter-weight parseStatusCounts() path for Client.GetSetByName() and update/extend tests accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
fofn/watcher.go Loads prior status file into subDir.Status before preparing chunks.
fofn/chunk.go Uses prior status (uploadFailed()) to decide whether “unchanged” files should still be uploaded.
fofn/report.go Changes ReportEntry.Status to transfer.RequestStatus and adds uploadFailed() helper.
fofn/status.go Changes parseStatus to return a map for fast lookup; adds parseStatusCounts for summary-only parsing.
fofn/scan.go Extends subDir to carry prior status and adds FOFNPath() helper.
fofn/client.go Uses parseStatusCounts() instead of parsing full status file in GetSetByName().
cmd/put.go Writes typed RequestStatus into report entries.
fofn/chunk_test.go Updates helpers to return subDir; adds/extends test coverage for “failed last time ⇒ don’t skip”.
fofn/status_test.go Updates tests to use transfer.RequestStatus and new parseStatus return type.
fofn/report_test.go Updates tests for typed status values.
fofn/watcher_test.go Updates test helpers/signatures to use typed statuses and updated writeFofn return type.
main_test.go Updates CLI/report parsing assertions to use transfer.RequestStatus constants/types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fofn/status.go Outdated
Comment thread fofn/chunk_test.go
@sb10 sb10 merged commit 56641aa into develop Apr 29, 2026
2 checks passed
@sb10 sb10 deleted the retry-failed-unchanged-fofn branch April 29, 2026 10:09
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.

3 participants