Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Releases of this module are tagged `dbkit/vX.Y.Z`.

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.3.0] - 2026-10-15

Expand Down
2 changes: 1 addition & 1 deletion dbkit/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/gopherium/framework/dbkit

go 1.27.3
go 1.27.4
4 changes: 4 additions & 0 deletions dbkit/postgres/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Releases of this module are tagged `dbkit/postgres/vX.Y.Z`.

## [Unreleased]

### Changed

- The module needs Go 1.27.4.

## [0.4.0] - 2026-11-02

### Added
Expand Down
2 changes: 1 addition & 1 deletion dbkit/postgres/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/dbkit/postgres

go 1.27.3
go 1.27.4

require (
github.com/gopherium/framework/dbkit v0.1.0
Expand Down
2 changes: 2 additions & 0 deletions dbkit/sqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Releases of this module are tagged `dbkit/sqlite/vX.Y.Z`.

### Added

- `ErrUnsupportedFileSystem` and `UnsupportedFileSystemError`, the error of a snapshot whose folder is on a network or FUSE file system, or on one that cannot move a file without replacing one.
- `Fingerprint`, a SHA-256 of the schema and the rows of the main database, read in one read-only transaction, without the rows a `Leave` names.
- `ErrNoSpace` and `SpaceError`, the error of a snapshot whose target folder has less free space than the copy and the margin.
- `ErrSnapshotExists`, which a snapshot error matches when a file already holds the target.
Expand All @@ -27,6 +28,7 @@ Releases of this module are tagged `dbkit/sqlite/vX.Y.Z`.
- A snapshot whose folder cannot move a file without replacing one fails with an error that names the folder and says to write snapshots to a local folder.
- The error of a target that already exists reads "dbkit: the snapshot target already exists: " and the target.
- The error of a copy in place whose folder failed to sync reads "dbkit: the snapshot is in place but its folder failed to sync: ", then the target and the cause.
- The module needs Go 1.27.4.

## [0.4.0] - 2026-10-31

Expand Down
36 changes: 36 additions & 0 deletions dbkit/sqlite/fs_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ func TestASnapshotRefusesANetworkOrFUSEFolderBeforeItsLock(t *testing.T) {
if got.snap != (dbkit.Snapshot{}) || fmt.Sprint(got.err) != want {
t.Errorf("Snapshot() = %+v, %v, want no snapshot and %q", got.snap, got.err, want)
}
fsMustBeUnsupported(t, got.err, UnsupportedFileSystemError{Folder: folder, FileSystem: tc.name})
internalMustHoldOnly(t, folder)
})
}
Expand All @@ -310,5 +311,40 @@ func TestAFailedSnapshotFolderReadNamesTheFolder(t *testing.T) {

internalMustAnswer(t, got, internalAnswer{err: unix.EIO},
"dbkit: read the file system of the snapshot folder "+folder+": "+unix.EIO.Error())
if errors.Is(got.err, ErrUnsupportedFileSystem) {
t.Errorf("Snapshot() error = %v, want one that does not match ErrUnsupportedFileSystem", got.err)
}
internalMustHoldOnly(t, folder)
}

func TestTheUnsupportedFileSystemErrorSaysSnapshotsAreNotSupported(t *testing.T) {
want := "dbkit: the file system of the snapshot folder does not support snapshots"

if got := ErrUnsupportedFileSystem.Error(); got != want {
t.Errorf("ErrUnsupportedFileSystem.Error() = %q, want %q", got, want)
}
}

// fsMustBeUnsupported fails the test unless err is the UnsupportedFileSystemError want and no other snapshot error.
func fsMustBeUnsupported(t *testing.T, err error, want UnsupportedFileSystemError) {
t.Helper()
var unsupported *UnsupportedFileSystemError
if !errors.As(err, &unsupported) {
t.Fatalf("Snapshot() error = %v, want an UnsupportedFileSystemError", err)
}
if *unsupported != want {
t.Errorf("Snapshot() error = %+v, want %+v", *unsupported, want)
}
if !errors.Is(err, ErrUnsupportedFileSystem) {
t.Errorf("Snapshot() error = %v, want one matching ErrUnsupportedFileSystem", err)
}
for _, other := range []error{ErrNoSpace, ErrSnapshotRunning, ErrSnapshotExists, ErrSnapshotUnsynced} {
if errors.Is(err, other) {
t.Errorf("Snapshot() error = %v, want one that does not match %v", err, other)
}
}
var space *SpaceError
if errors.As(err, &space) {
t.Errorf("Snapshot() error = %v, want one that is no SpaceError", err)
}
}
2 changes: 1 addition & 1 deletion dbkit/sqlite/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/dbkit/sqlite

go 1.27.3
go 1.27.4

require (
github.com/gopherium/framework/dbkit v0.3.0
Expand Down
6 changes: 2 additions & 4 deletions dbkit/sqlite/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ func (s *snapshotter) writeCopy(ctx context.Context, partial, target string) err
case errors.Is(err, fs.ErrExist):
return existingTarget(target)
case errors.Is(err, noReplaceUnsupported):
return fmt.Errorf("dbkit: the file system of the snapshot folder %s cannot move a file without replacing one, "+
"%s: %w", filepath.Dir(target), localFolderAdvice, err)
return &UnsupportedFileSystemError{Folder: filepath.Dir(target), Err: err}
case err != nil:
return fmt.Errorf("dbkit: move the snapshot copy to %s: %w", target, err)
}
Expand Down Expand Up @@ -264,8 +263,7 @@ func checkFolders(folder string) error {
case err != nil:
return fmt.Errorf("dbkit: read the file system of the snapshot folder %s: %w", folder, err)
case name != "":
return fmt.Errorf("dbkit: the snapshot folder %s is on a network or FUSE file system (%s), %s",
folder, name, localFolderAdvice)
return &UnsupportedFileSystemError{Folder: folder, FileSystem: name}
}
return nil
}
Expand Down
3 changes: 3 additions & 0 deletions dbkit/sqlite/snapshot_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ func TestAFailedMoveLeavesNoTarget(t *testing.T) {

internalMustAnswer(t, got, internalAnswer{err: errSnapshotMoveFailed},
"dbkit: move the snapshot copy to "+target+": "+errSnapshotMoveFailed.Error())
if errors.Is(got.err, ErrUnsupportedFileSystem) {
t.Errorf("Snapshot() error = %v, want one that does not match ErrUnsupportedFileSystem", got.err)
}
internalMustHoldOnly(t, folder, snapshotLockFile)
}

Expand Down
1 change: 1 addition & 0 deletions dbkit/sqlite/snapshot_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ func TestAFolderThatCannotMoveWithoutReplacingSaysSo(t *testing.T) {
internalMustAnswer(t, got, internalAnswer{err: unix.EINVAL},
"dbkit: the file system of the snapshot folder "+folder+" cannot move a file without replacing one, "+
fsLocalAdvice+": "+unix.EINVAL.Error())
fsMustBeUnsupported(t, got.err, UnsupportedFileSystemError{Folder: folder, Err: unix.EINVAL})
internalMustHoldOnly(t, folder, snapshotLockFile)
}
6 changes: 5 additions & 1 deletion dbkit/sqlite/space_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ func spaceMustFail(t *testing.T, snap dbkit.Snapshot, err error, want SpaceError
if !errors.Is(err, ErrNoSpace) {
t.Errorf("Snapshot() error = %v, want one matching ErrNoSpace", err)
}
for _, other := range []error{ErrSnapshotRunning, ErrSnapshotExists, ErrSnapshotUnsynced} {
for _, other := range []error{ErrUnsupportedFileSystem, ErrSnapshotRunning, ErrSnapshotExists, ErrSnapshotUnsynced} {
if errors.Is(err, other) {
t.Errorf("Snapshot() error = %v, want one that does not match %v", err, other)
}
}
var unsupported *UnsupportedFileSystemError
if errors.As(err, &unsupported) {
t.Errorf("Snapshot() error = %v, want one that is no UnsupportedFileSystemError", err)
}
if snap != (dbkit.Snapshot{}) {
t.Errorf("Snapshot() = %+v, want no snapshot", snap)
}
Expand Down
41 changes: 41 additions & 0 deletions dbkit/sqlite/unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: Apache-2.0

package sqlite

import (
"errors"
"fmt"
)

// ErrUnsupportedFileSystem is the error of a snapshot whose folder is on a file system Snapshot does not support.
var ErrUnsupportedFileSystem = errors.New("dbkit: the file system of the snapshot folder does not support snapshots")

// UnsupportedFileSystemError reports a snapshot folder on a file system Snapshot does not support.
type UnsupportedFileSystemError struct {
// Folder is the target folder of the snapshot.
Folder string
// FileSystem is the name of the network or FUSE file system of Folder, or "" when Err is set.
FileSystem string
// Err is the error of the move the file system cannot make without replacing a file, or nil when FileSystem is set.
Err error
}

// Error returns the folder, its file system or the failed move, and the advice to write snapshots to a local folder.
func (e *UnsupportedFileSystemError) Error() string {
if e.Err != nil {
return fmt.Sprintf("dbkit: the file system of the snapshot folder %s cannot move a file without replacing one, "+
"%s: %v", e.Folder, localFolderAdvice, e.Err)
}
return fmt.Sprintf("dbkit: the snapshot folder %s is on a network or FUSE file system (%s), %s",
e.Folder, e.FileSystem, localFolderAdvice)
}

// Is reports whether target is ErrUnsupportedFileSystem.
func (e *UnsupportedFileSystemError) Is(target error) bool {
return target == ErrUnsupportedFileSystem
}

// Unwrap returns the error of the failed move, or nil.
func (e *UnsupportedFileSystemError) Unwrap() error {
return e.Err
}
2 changes: 1 addition & 1 deletion goncierge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Releases of this module are tagged `goncierge/vX.Y.Z`.

## Unreleased

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## 0.1.0 - 2026-10-10

Expand Down
2 changes: 1 addition & 1 deletion goncierge/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/gopherium/framework/goncierge

go 1.27.3
go 1.27.4
4 changes: 4 additions & 0 deletions gonsole/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Releases of this module are tagged `gonsole/vX.Y.Z`.

## [Unreleased]

### Changed

- The module needs Go 1.27.4.

## [0.9.0] - 2026-10-31

### Added
Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Releases of this module are tagged `gonsole/auth/vX.Y.Z`.

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.9.0] - 2026-10-18

Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/gonsole/auth

go 1.27.3
go 1.27.4

require (
github.com/google/uuid v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/postgres/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Releases of this module are tagged `gonsole/auth/postgres/vX.Y.Z`.

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.2.0] - 2026-10-14

Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/postgres/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/gonsole/auth/postgres

go 1.27.3
go 1.27.4

require (
github.com/gopherium/framework/dbkit v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/sqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Releases of this module are tagged `gonsole/auth/sqlite/vX.Y.Z`.

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.2.0] - 2026-10-14

Expand Down
2 changes: 1 addition & 1 deletion gonsole/auth/sqlite/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/gonsole/auth/sqlite

go 1.27.3
go 1.27.4

require (
github.com/gopherium/framework/dbkit v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion gonsole/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/gopherium/framework/gonsole

go 1.27.3
go 1.27.4

require golang.org/x/text v0.41.0
2 changes: 1 addition & 1 deletion mailkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Releases of this module are tagged `mailkit/vX.Y.Z`.

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.1.0] - 2026-08-30

Expand Down
2 changes: 1 addition & 1 deletion mailkit/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/mailkit

go 1.27.3
go 1.27.4

require (
github.com/mocktools/go-smtp-mock/v2 v2.5.4
Expand Down
1 change: 1 addition & 0 deletions pluginkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Releases of this module are tagged `pluginkit/vX.Y.Z`. Releases up to
- `Protect` takes the plugin's id and a `RouteSettings`, which holds the middleware as `Wrap`, a breaking change.
- `Protect` recovers each panic of a plugin's handler, on its public paths too. While nothing went out, `RouteSettings.Answer` answers it, else the connection is cut, and `RouteSettings.Report` receives a `RouteFailure` with the stack.
- `RoutesEach` reads each plugin's routes and public paths inside a recover, and fails at the new `StepRoutes` a plugin whose `Routes` or `PublicPaths` panics, or whose `Routes` answers no handler.
- The module needs Go 1.27.4.

## 0.12.0 - 2026-11-07

Expand Down
2 changes: 1 addition & 1 deletion pluginkit/features/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/pluginkit/features

go 1.27.3
go 1.27.4

require (
github.com/cucumber/godog v0.16.0
Expand Down
2 changes: 1 addition & 1 deletion pluginkit/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/gopherium/framework/pluginkit

go 1.27.3
go 1.27.4
2 changes: 1 addition & 1 deletion pluginkit/graphwire/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ stdlib-only `pluginkit` module so its gqlparser dependency never enters

### Changed

- The module needs Go 1.27.3.
- The module needs Go 1.27.4.

## [0.4.0] - 2026-09-26

Expand Down
2 changes: 1 addition & 1 deletion pluginkit/graphwire/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/gopherium/framework/pluginkit/graphwire

go 1.27.3
go 1.27.4

require github.com/vektah/gqlparser/v2 v2.5.36
6 changes: 6 additions & 0 deletions postgresblob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ v0.x, minor releases may contain breaking changes.

Releases of this module are tagged `postgresblob/vX.Y.Z`.

## [Unreleased]

### Changed

- The module needs Go 1.27.4.

## [0.1.0] - 2026-10-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion postgresblob/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gopherium/framework/postgresblob

go 1.27.3
go 1.27.4

require (
github.com/google/uuid v1.6.0
Expand Down
Loading