Skip to content

v0.19.1

Choose a tag to compare

@github-actions github-actions released this 24 Sep 03:07
· 145 commits to main since this release
3cca064

Highlights

s2.Move on an osfs or memfs storage moves into a destination whose parent directory does not exist yet, as Put and Copy always could. Move("a.txt", "dir/a.txt") failed with no such file or directory when dir/ did not exist: the backend renames the file and a rename does not create parents. osfs has behaved this way since the backend was written. memfs started in v0.16.0, whose wfs bump made its rename match the operating system's, so a test suite running on memfs that moves into a new prefix has failed since then. s3, gcs and azblob were never affected, and s2-server does not call Move.

Changes

Fixed

  • osfs and memfs create the destination's parent directory, and that of its metadata sidecar, in Move (#287, #288)

Upgrading

  • Submodule consumers: go get github.com/mojatter/s2/<module>@v0.19.1
  • s2-server operators running the image: docker pull mojatter/s2-server:0.19.1 (:latest points at it too)
  • cmd/s2-server/v0.19.1 is published separately, shortly after: go install github.com/mojatter/s2/cmd/s2-server@v0.19.1
  • No configuration changes and no change to data at rest.

Library users

  • On osfs and memfs, s2.Move into a destination under a directory that does not exist succeeds instead of returning an error. Nothing that succeeded before changes.
  • A parent that cannot be created — a file standing where a directory must go — fails the Move before anything is renamed, so the source is left as it was.

Storage implementers

  • s2test.TestStorageCopyMove now also moves an object into a prefix that holds nothing yet and requires the source to be gone and the body to arrive. A backend without s2.Mover goes through Copy + Delete and passes as before; one whose Move renames without creating the destination's parent fails it.

s2-server operators

  • Nothing changes. The server does not move objects; the image is rebuilt on the new version.

Full Changelog

v0.19.0...v0.19.1