Always upload files that failed in the previous run#184
Merged
Conversation
There was a problem hiding this comment.
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
statusintosubDirand use it during chunk generation to avoid skipping previously failed/missing uploads. - Switch report/status handling from raw status strings to
transfer.RequestStatus(includingfofn.ReportEntry.Status). - Add a lighter-weight
parseStatusCounts()path forClient.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.
sb10
approved these changes
Apr 29, 2026
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.
No description provided.