Make remote nuke delete leftover .partial uploads (closes #281)
check / check (push) Waiting to run

Every listing skips an object whose name ends in `.partial`, the
temporary name a `file://` or rclone upload writes before moving the
object into place. `remote nuke` deletes only what the listings return,
so it left the `.partial` objects killed uploads leave behind and still
reported the destination store empty.

Storer gains DeletePartialUploads. The file and rclone backends remove
every `.partial` object under the prefix; S3 has none to remove, since
it shows an object only once its upload completes. `remote nuke` calls
it for `metadata/` and `blobs/` as its last step.

Empty directories under a `file://` destination are still left behind.

Model: opus-5-5
This commit is contained in:
2026-10-08 07:12:38 +00:00
parent 0d0368df81
commit d6752fc252
13 changed files with 244 additions and 2 deletions
+6
View File
@@ -99,6 +99,12 @@ func (s *S3Storer) ListStream(ctx context.Context, prefix string) <-chan ObjectI
return ch
}
// DeletePartialUploads has nothing to remove: S3 shows an object only once
// its upload has completed, so an upload cut off part-way leaves none.
func (s *S3Storer) DeletePartialUploads(_ context.Context, _ string) error {
return nil
}
// Info returns human-readable storage location information.
func (s *S3Storer) Info() Info {
return Info{