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
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
go-version:
- "1.26"
- "1.27"
postgres-version: [17]
fail-fast: false
timeout-minutes: 5
Expand Down Expand Up @@ -75,21 +75,21 @@ jobs:
matrix:
include:
# Run the latest Go version against all supported Postgres versions:
- go-version: "1.26"
- go-version: "1.27"
postgres-version: 18
- go-version: "1.26"
- go-version: "1.27"
postgres-version: 17
- go-version: "1.26"
- go-version: "1.27"
postgres-version: 16
- go-version: "1.26"
- go-version: "1.27"
postgres-version: 15
- go-version: "1.26"
- go-version: "1.27"
postgres-version: 14

# Also run the previous Go version (the Go version previous to current
# is the only other officially supported Go version) against the
# latest Postgres version:
- go-version: "1.25"
- go-version: "1.26"
postgres-version: 18
fail-fast: false
timeout-minutes: 5
Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
name: lint
runs-on: ubuntu-latest
env:
GOLANGCI_LINT_VERSION: v2.12.2
GOLANGCI_LINT_VERSION: v2.13.1
permissions:
contents: read
# allow read access to pull request. Use with `only-new-issues` option.
Expand Down
8 changes: 8 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ linters:

# disabled because we're not compliant, but which we should think about
- exhaustruct # checks that properties in structs are exhaustively defined; may be a good idea
- exhaustruct_v5 # they actually did another one
- testpackage # requires tests in test packages like `river_test`

# disabled because it's deprecated, and `default: all` already enables its
Expand Down Expand Up @@ -92,6 +93,13 @@ linters:
excludes:
- G404 # use of non-crypto random; overly broad for our use case

modernize:
disable:
# Keep the Go 1.26 upgrade focused; apply its modernizations separately.
- errorsastype
- newexpr
- stditerators

revive:
rules:
- name: unused-parameter
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Upgrade supported Go versions to 1.26 and 1.27. [PR #1356](https://github.com/riverqueue/river/pull/1356).

## [0.44.1] - 2026-08-21

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions cmd/river/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/cmd/river

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/jackc/pgx/v5 v5.10.0
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
Expand Down
4 changes: 2 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

use (
.
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/riverdriver

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/riverqueue/river/rivertype v0.44.1
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riverdatabasesql/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/riverdriver/riverdatabasesql

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/jackc/pgx/v5 v5.10.0
Expand Down
1 change: 1 addition & 0 deletions riverdriver/riverdatabasesql/river_database_sql_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (d *Driver) GetListener(params *riverdriver.GetListenenerParams) riverdrive
}

func (d *Driver) GetMigrationDefaultLines() []string { return []string{riverdriver.MigrationLineMain} }

func (d *Driver) GetMigrationFS(line string) fs.FS {
if line == riverdriver.MigrationLineMain {
return migrationFS
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riverdrivertest/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/riverdriver/riverdrivertest

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/davecgh/go-spew v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riverdrivertest/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ func exerciseQueue[TTx any](ctx context.Context, t *testing.T, executorWithTx fu
})
require.NoError(t, err)
require.NotNil(t, queue1Fetched.PausedAt)
require.WithinDuration(t, now, *(queue1Fetched.PausedAt), 500*time.Millisecond)
require.WithinDuration(t, now, *queue1Fetched.PausedAt, 500*time.Millisecond)

queue2Fetched, err := exec.QueueGet(ctx, &riverdriver.QueueGetParams{
Name: queue2.Name,
})
require.NoError(t, err)
require.NotNil(t, queue2Fetched.PausedAt)
require.WithinDuration(t, now, *(queue2Fetched.PausedAt), 500*time.Millisecond)
require.WithinDuration(t, now, *queue2Fetched.PausedAt, 500*time.Millisecond)
})

t.Run("AllQueuesNoQueues", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riverpgxv5/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/riverdriver/riverpgxv5

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/jackc/pgx/v5 v5.10.0
Expand Down
1 change: 1 addition & 0 deletions riverdriver/riverpgxv5/river_pgx_v5_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (d *Driver) GetListener(params *riverdriver.GetListenenerParams) riverdrive
}

func (d *Driver) GetMigrationDefaultLines() []string { return []string{riverdriver.MigrationLineMain} }

func (d *Driver) GetMigrationFS(line string) fs.FS {
if line == riverdriver.MigrationLineMain {
return migrationFS
Expand Down
4 changes: 2 additions & 2 deletions riverdriver/riversqlite/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/riverdriver/riversqlite

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/riverqueue/river v0.44.1
Expand Down
1 change: 1 addition & 0 deletions riverdriver/riversqlite/river_sqlite_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (d *Driver) GetListener(params *riverdriver.GetListenenerParams) riverdrive
}

func (d *Driver) GetMigrationDefaultLines() []string { return []string{riverdriver.MigrationLineMain} }

func (d *Driver) GetMigrationFS(line string) fs.FS {
if line == riverdriver.MigrationLineMain {
return migrationFS
Expand Down
4 changes: 2 additions & 2 deletions rivershared/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/rivershared

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require (
github.com/jackc/pgx/v5 v5.10.0
Expand Down
8 changes: 4 additions & 4 deletions rivershared/testfactory/test_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ func Job_Build(tb testing.TB, opts *JobOpts) *riverdriver.JobInsertFullParams {
tb.Helper()

attemptedAt := opts.AttemptedAt
if attemptedAt == nil && (opts.State != nil && (slices.Contains([]rivertype.JobState{
if attemptedAt == nil && (opts.State != nil && slices.Contains([]rivertype.JobState{
rivertype.JobStateCompleted,
rivertype.JobStateDiscarded,
rivertype.JobStateRetryable,
rivertype.JobStateRunning,
}, *opts.State))) {
}, *opts.State)) {
attemptedAt = ptrutil.Ptr(time.Now())
}

Expand All @@ -67,11 +67,11 @@ func Job_Build(tb testing.TB, opts *JobOpts) *riverdriver.JobInsertFullParams {
}

finalizedAt := opts.FinalizedAt
if finalizedAt == nil && (opts.State != nil && (slices.Contains([]rivertype.JobState{
if finalizedAt == nil && (opts.State != nil && slices.Contains([]rivertype.JobState{
rivertype.JobStateCompleted,
rivertype.JobStateCancelled,
rivertype.JobStateDiscarded,
}, *opts.State))) {
}, *opts.State)) {
finalizedAt = ptrutil.Ptr(time.Now())
}

Expand Down
4 changes: 2 additions & 2 deletions rivertype/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/riverqueue/river/rivertype

go 1.25.0
go 1.26.0

toolchain go1.25.7
toolchain go1.26.6

require github.com/stretchr/testify v1.11.1

Expand Down
Loading