Skip to content

Commit a25c0ce

Browse files
zaataylorcschleiden
authored andcommitted
Upgrade to go-redis v9
1 parent 2a42c1f commit a25c0ce

File tree

12 files changed

+26
-24
lines changed

12 files changed

+26
-24
lines changed

backend/redis/diagnostics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77

88
"github.com/cschleiden/go-workflows/diag"
9-
"github.com/go-redis/redis/v8"
9+
redis "github.com/redis/go-redis/v9"
1010
)
1111

1212
var _ diag.Backend = (*redisBackend)(nil)

backend/redis/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/cschleiden/go-workflows/internal/core"
99
"github.com/cschleiden/go-workflows/internal/history"
10-
"github.com/go-redis/redis/v8"
10+
"github.com/redis/go-redis/v9"
1111
)
1212

1313
func addEventToStreamP(ctx context.Context, p redis.Pipeliner, streamKey string, event *history.Event) error {

backend/redis/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/cschleiden/go-workflows/internal/core"
1111
"github.com/cschleiden/go-workflows/internal/history"
1212
"github.com/cschleiden/go-workflows/workflow"
13-
"github.com/go-redis/redis/v8"
13+
"github.com/redis/go-redis/v9"
1414
)
1515

1616
func (rb *redisBackend) CreateWorkflowInstance(ctx context.Context, instance *workflow.Instance, event *history.Event) error {
@@ -138,7 +138,7 @@ func createInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.Work
138138

139139
p.SetNX(ctx, key, string(b), 0)
140140

141-
p.ZAdd(ctx, instancesByCreation(), &redis.Z{
141+
p.ZAdd(ctx, instancesByCreation(), redis.Z{
142142
Member: instance.InstanceID,
143143
Score: float64(createdAt.UnixMilli()),
144144
})

backend/redis/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"time"
88

9-
"github.com/go-redis/redis/v8"
109
"github.com/google/uuid"
10+
"github.com/redis/go-redis/v9"
1111
)
1212

1313
type taskQueue[T any] struct {

backend/redis/queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/go-redis/redis/v8"
9+
"github.com/redis/go-redis/v9"
1010
"github.com/stretchr/testify/require"
1111
)
1212

backend/redis/redis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/cschleiden/go-workflows/internal/metrickeys"
1313
"github.com/cschleiden/go-workflows/log"
1414
"github.com/cschleiden/go-workflows/metrics"
15-
"github.com/go-redis/redis/v8"
15+
"github.com/redis/go-redis/v9"
1616
"go.opentelemetry.io/otel/trace"
1717
)
1818

backend/redis/redis_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/cschleiden/go-workflows/backend/test"
1313
"github.com/cschleiden/go-workflows/internal/history"
1414
"github.com/cschleiden/go-workflows/log"
15-
"github.com/go-redis/redis/v8"
15+
"github.com/redis/go-redis/v9"
1616
)
1717

1818
const (

backend/redis/signal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/cschleiden/go-workflows/internal/history"
88
"github.com/cschleiden/go-workflows/internal/tracing"
9-
"github.com/go-redis/redis/v8"
9+
"github.com/redis/go-redis/v9"
1010
"go.opentelemetry.io/otel/attribute"
1111
"go.opentelemetry.io/otel/trace"
1212
)

backend/redis/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/cschleiden/go-workflows/internal/history"
1212
"github.com/cschleiden/go-workflows/internal/task"
1313
"github.com/cschleiden/go-workflows/internal/tracing"
14-
"github.com/go-redis/redis/v8"
14+
"github.com/redis/go-redis/v9"
1515
"go.opentelemetry.io/otel/attribute"
1616
"go.opentelemetry.io/otel/trace"
1717
)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ module github.com/cschleiden/go-workflows
33
go 1.18
44

55
require (
6-
github.com/go-redis/redis/v8 v8.11.5
76
github.com/go-sql-driver/mysql v1.6.0
87
github.com/golangci/golangci-lint v1.50.0
98
github.com/google/uuid v1.3.0
109
github.com/jellydator/ttlcache/v3 v3.0.0
1110
github.com/jstemmer/go-junit-report/v2 v2.0.0-beta1
1211
github.com/mattn/go-sqlite3 v1.14.12
13-
github.com/stretchr/testify v1.8.0
12+
github.com/redis/go-redis/v9 v9.0.2
13+
github.com/stretchr/testify v1.8.1
1414
go.opentelemetry.io/otel v1.7.0
1515
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0
1616
go.opentelemetry.io/otel/trace v1.7.0
@@ -59,7 +59,7 @@ require (
5959
github.com/breml/errchkjson v0.3.0 // indirect
6060
github.com/butuzov/ireturn v0.1.1 // indirect
6161
github.com/cenkalti/backoff/v4 v4.1.3
62-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
62+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
6363
github.com/charithe/durationcheck v0.0.9 // indirect
6464
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
6565
github.com/daixiang0/gci v0.8.0 // indirect
@@ -200,7 +200,7 @@ require (
200200
github.com/benbjohnson/clock v1.3.0
201201
github.com/davecgh/go-spew v1.1.1 // indirect
202202
github.com/pmezard/go-difflib v1.0.0 // indirect
203-
github.com/stretchr/objx v0.4.0 // indirect
203+
github.com/stretchr/objx v0.5.0 // indirect
204204
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0
205205
go.opentelemetry.io/otel/sdk v1.7.0
206206
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)