Skip to content

v0.39.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 07:32
· 15 commits to main since this release
2a7aae1

Highlights

This release changes no behaviour in s2, the backends or s2-server: outside tests and s2test, the Go changes since v0.38.0 are comments only. It is for Storage implementers: s2test gains one check and TestStorageExists asserts more, so a backend whose tests call it can start failing on this upgrade.

  • s2test.TestStorageObjectConcurrency reads an object's accessors on 8 goroutines at once (#589, fixes #498). It is the check the v0.30.0 notes said was missing, when s2-server began reading Metadata() concurrently; run it with -race.
  • s2test.TestStorageExists now requires Exists to report a name that only has keys under it (#588, fixes #587), and the Storage.Exists godoc states that contract. Every bundled backend already answered this way; a Storage from outside this repository may not, see Upgrading.

Changes

Features

  • s2test: TestStorageObjectConcurrency (#589, fixes #498)
  • s2test: TestStorageExists also checks a name that only has keys under it, before and after its last key is deleted (#588, fixes #587)

Documentation

  • s2: the Storage.Exists godoc says a key at name or, for a name not ending in /, under name + "/" is present, and no longer says flat backends resolve only leaf objects (#588)
  • s2: the Concurrency section of the package doc lists StorageClass among the accessors safe for concurrent use, and names the new check (#589)
  • README and docs/backends.md link s2-gdrive, a Google Drive backend in its own repository (#585, #516)

CI / Build

  • Bump intra-repo deps to v0.39.0 (#590); v0.38.0 bookkeeping for cmd/s2-server (#584)

Upgrading

  • Submodule consumers: go get github.com/mojatter/s2/<module>@v0.39.0
  • s2-server operators running the image: docker pull mojatter/s2-server:0.39.0 (:latest points at it too)
  • cmd/s2-server/v0.39.0 is published separately, shortly after: go install github.com/mojatter/s2/cmd/s2-server@v0.39.0
  • No module's go directive moved and go.work is unchanged since v0.38.0.
  • No configuration changes and no change to the data at rest; downgrading to v0.38.0 is safe.

Library users

  • Nothing to do: the godoc changes describe what the bundled backends already did, and no behaviour changes.

Storage implementers

  • s2test.TestStorageExists: a Storage whose Exists answers only for stored keys now fails it; on a miss, probe for a key under name + "/". A Storage that keeps a directory after its last key is deleted fails it too; remove emptied directories on Delete, as osfs and memfs do, and keep that removal from running beside a write into the same directory: on osfs and memfs it made such writes fail from v0.20.2 until the locks of v0.21.0 (#317, docs/backends.md). A name ending in / must still report only a stored marker.
  • s2test.TestStorageObjectConcurrency: new. It reads every accessor of objects from List, Get and s2.Stat on 8 goroutines at once and compares what they read. Add it to your backend's tests, since no other check runs it, and run them with -race; without the race detector it does not see an unsynchronized lazy accessor.
  • No other s2test check changed since v0.38.0.

s2-server operators

  • Nothing changes and there is nothing to do; this version has no section in docs/upgrading.md.

Full Changelog

v0.38.0...v0.39.0