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
4 changes: 2 additions & 2 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ description: 'Runs go-redis tests against different Redis versions and configura
inputs:
go-version:
description: 'Go version to use for running tests'
default: '1.23'
default: '1.24'
redis-version:
description: 'Redis version to test against'
required: true
runs:
using: "composite"
steps:
- name: Set up ${{ inputs.go-version }}
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version }}

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
- "8.2.x" # Redis CE 8.2
- "8.0.x" # Redis CE 8.0
go-version:
- "1.21.x"
- "1.23.x"
- "1.24.x"
- oldstable
- stable

Expand Down Expand Up @@ -83,8 +82,7 @@ jobs:
- "8.2.x" # Redis CE 8.2
- "8.0.x" # Redis CE 8.0
go-version:
- "1.21.x"
- "1.23.x"
- "1.24.x"
- oldstable
- stable

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
fail-fast: false
matrix:
go-version:
- "1.23.x"
- stable

steps:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test.ci:
export RE_CLUSTER=$(RE_CLUSTER) && \
export RCE_DOCKER=$(RCE_DOCKER) && \
export REDIS_VERSION=$(REDIS_VERSION) && \
go mod tidy -compat=1.18 && \
go mod tidy && \
go vet && \
go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race -skip Example); \
done
Expand All @@ -63,7 +63,7 @@ test.ci.skip-vectorsets:
export RE_CLUSTER=$(RE_CLUSTER) && \
export RCE_DOCKER=$(RCE_DOCKER) && \
export REDIS_VERSION=$(REDIS_VERSION) && \
go mod tidy -compat=1.18 && \
go mod tidy && \
go vet && \
go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race \
-run '^(?!.*(?:VectorSet|vectorset|ExampleClient_vectorset)).*$$' -skip Example); \
Expand Down Expand Up @@ -118,5 +118,5 @@ go_mod_tidy:
echo "go mod tidy in $${dir}"; \
(cd "$${dir}" && \
go get -u ./... && \
go mod tidy -compat=1.18); \
go mod tidy); \
done
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ In `go-redis` we are aiming to support the last three releases of Redis. Current
- [Redis 8.2](https://raw.githubusercontent.com/redis/redis/8.2/00-RELEASENOTES) - using Redis CE 8.2
- [Redis 8.4](https://raw.githubusercontent.com/redis/redis/8.4/00-RELEASENOTES) - using Redis CE 8.4

Although the `go.mod` states it requires at minimum `go 1.21`, our CI is configured to run the tests against all three
versions of Redis and multiple versions of Go ([1.21](https://go.dev/doc/devel/release#go1.21.0),
[1.23](https://go.dev/doc/devel/release#go1.23.0), oldstable, and stable). We observe that some modules related test may not pass with
Although the `go.mod` states it requires at minimum `go 1.24`, our CI is configured to run the tests against all three
versions of Redis and multiple versions of Go ([1.24](https://go.dev/doc/devel/release#go1.24.0), oldstable, and stable). We observe that some modules related test may not pass with
Redis Stack 7.2 and some commands are changed with Redis CE 8.0.
Although it is not officially supported, `go-redis/v9` should be able to work with any Redis 7.0+.
Please do refer to the documentation and the tests if you experience any issues.
Expand Down
2 changes: 1 addition & 1 deletion example/cluster-mget/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/cluster-mget

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/del-keys-without-ttl/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/del-keys-without-ttl

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/digest-optimistic-locking/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/digest-optimistic-locking

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/disable-maintnotifications/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/disable-maintnotifications

go 1.23
go 1.24

replace github.com/redis/go-redis/v9 => ../..

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

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/hset-struct/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/scan-struct

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/lua-scripting/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/lua-scripting

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/maintnotifiations-pubsub/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/pubsub

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/otel-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This example demonstrates how to enable OpenTelemetry metrics for Redis operatio

## Prerequisites

- Go 1.23.0 or later
- Go 1.24.0 or later
- Redis server running on `localhost:6379`
- OTLP collector running on `localhost:4317` (optional)

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

go 1.23.0
go 1.24

toolchain go1.24.1

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

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/scan-struct/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/scan-struct

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

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

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/tls-connection/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/example/tls-connection

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion extra/rediscensus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/extra/rediscensus/v9

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion extra/rediscmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/extra/rediscmd/v9

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion extra/redisotel/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/extra/redisotel/v9

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

Expand Down
2 changes: 1 addition & 1 deletion extra/redisprometheus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/extra/redisprometheus/v9

go 1.21
go 1.24

replace github.com/redis/go-redis/v9 => ../..

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

go 1.21
go 1.24

require (
github.com/bsm/ginkgo/v2 v2.12.0
Expand Down
2 changes: 1 addition & 1 deletion internal/customvet/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/redis/go-redis/internal/customvet

go 1.21
go 1.24

require golang.org/x/tools v0.5.0

Expand Down
9 changes: 7 additions & 2 deletions json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,9 @@ var _ = Describe("Go-Redis Advanced JSON and RediSearch Tests", func() {
typeCmd := client.JSONType(ctx, "person:1", "$.person.nickname")
nicknameType, err := typeCmd.Result()
Expect(err).NotTo(HaveOccurred(), "JSON.TYPE failed")
Expect(nicknameType[0]).To(Equal([]interface{}{"string"}), "JSON.TYPE mismatch for nickname")
Expect(nicknameType).To(HaveLen(1), "JSON.TYPE should return one element")
// RESP2 v RESP3
Expect(nicknameType[0]).To(Or(Equal([]interface{}{"string"}), Equal("string")), "JSON.TYPE mismatch for nickname")

createIndexCmd := client.Do(ctx, "FT.CREATE", "person_idx", "ON", "JSON",
"PREFIX", "1", "person:", "SCHEMA",
Expand All @@ -859,7 +861,10 @@ var _ = Describe("Go-Redis Advanced JSON and RediSearch Tests", func() {
typeCmd = client.JSONType(ctx, "person:1", "$.settings.notifications.email")
typeResult, err := typeCmd.Result()
Expect(err).ToNot(HaveOccurred())
Expect(typeResult[0]).To(BeEmpty(), "Expected JSON.TYPE to be empty for deleted field")
// After deletion, JSON.TYPE returns empty slice or slice with empty/nil value
if len(typeResult) > 0 {
Expect(typeResult[0]).To(Or(BeNil(), BeEmpty()), "Expected JSON.TYPE to be empty for deleted field")
}
})
})
}
Expand Down
2 changes: 1 addition & 1 deletion maintnotifications/e2e/cmd/proxy-fi-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.21-alpine AS builder
FROM golang:1.24-alpine AS builder

WORKDIR /build

Expand Down
Loading