Skip to content

Commit 7529b11

Browse files
authored
Merge branch 'master' into ISSUE-3402
2 parents e2ff9f4 + 6871741 commit 7529b11

File tree

9 files changed

+29
-32
lines changed

9 files changed

+29
-32
lines changed

.github/actions/run-tests/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ runs:
2525
2626
# Mapping of redis version to redis testing containers
2727
declare -A redis_version_mapping=(
28-
["8.0.1"]="8.0.1-pre"
29-
["7.4.2"]="rs-7.4.0-v2"
30-
["7.2.7"]="rs-7.2.0-v14"
28+
["8.0.x"]="8.0.2"
29+
["7.4.x"]="rs-7.4.0-v5"
30+
["7.2.x"]="rs-7.2.0-v17"
3131
)
3232
3333
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
redis-version:
21-
- "8.0.1" # 8.0.1
22-
- "7.4.2" # should use redis stack 7.4
21+
- "8.0.x" # Redis CE 8.0
22+
- "7.4.x" # Redis stack 7.4
2323
go-version:
2424
- "1.23.x"
2525
- "1.24.x"
@@ -43,8 +43,8 @@ jobs:
4343
4444
# Mapping of redis version to redis testing containers
4545
declare -A redis_version_mapping=(
46-
["8.0.1"]="8.0.1-pre"
47-
["7.4.2"]="rs-7.4.0-v2"
46+
["8.0.x"]="8.0.2"
47+
["7.4.x"]="rs-7.4.0-v5"
4848
)
4949
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
5050
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
@@ -72,9 +72,9 @@ jobs:
7272
fail-fast: false
7373
matrix:
7474
redis-version:
75-
- "8.0.1" # 8.0.1
76-
- "7.4.2" # should use redis stack 7.4
77-
- "7.2.7" # should redis stack 7.2
75+
- "8.0.x" # Redis CE 8.0
76+
- "7.4.x" # Redis stack 7.4
77+
- "7.2.x" # Redis stack 7.2
7878
go-version:
7979
- "1.23.x"
8080
- "1.24.x"

.github/workflows/doctests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
services:
1818
redis-stack:
19-
image: redislabs/client-libs-test:8.0.1-pre
19+
image: redislabs/client-libs-test:8.0.2
2020
env:
2121
TLS_ENABLED: no
2222
REDIS_CLUSTER: no

osscluster.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -979,13 +979,6 @@ func (c *ClusterClient) Close() error {
979979
return c.nodes.Close()
980980
}
981981

982-
// Do create a Cmd from the args and processes the cmd.
983-
func (c *ClusterClient) Do(ctx context.Context, args ...interface{}) *Cmd {
984-
cmd := NewCmd(ctx, args...)
985-
_ = c.Process(ctx, cmd)
986-
return cmd
987-
}
988-
989982
func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error {
990983
err := c.processHook(ctx, cmd)
991984
cmd.SetErr(err)

osscluster_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,12 @@ var _ = Describe("ClusterClient", func() {
264264
var client *redis.ClusterClient
265265

266266
assertClusterClient := func() {
267+
It("do", func() {
268+
val, err := client.Do(ctx, "ping").Result()
269+
Expect(err).NotTo(HaveOccurred())
270+
Expect(val).To(Equal("PONG"))
271+
})
272+
267273
It("should GET/SET/DEL", func() {
268274
err := client.Get(ctx, "A").Err()
269275
Expect(err).To(Equal(redis.Nil))

redis.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -776,13 +776,6 @@ func (c *Client) Conn() *Conn {
776776
return newConn(c.opt, pool.NewStickyConnPool(c.connPool), &c.hooksMixin)
777777
}
778778

779-
// Do create a Cmd from the args and processes the cmd.
780-
func (c *Client) Do(ctx context.Context, args ...interface{}) *Cmd {
781-
cmd := NewCmd(ctx, args...)
782-
_ = c.Process(ctx, cmd)
783-
return cmd
784-
}
785-
786779
func (c *Client) Process(ctx context.Context, cmd Cmder) error {
787780
err := c.processHook(ctx, cmd)
788781
cmd.SetErr(err)

redis_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ var _ = Describe("Client", func() {
8989
Expect(err).NotTo(HaveOccurred())
9090
})
9191

92+
It("do", func() {
93+
val, err := client.Do(ctx, "ping").Result()
94+
Expect(err).NotTo(HaveOccurred())
95+
Expect(val).To(Equal("PONG"))
96+
})
97+
9298
It("should ping", func() {
9399
val, err := client.Ping(ctx).Result()
94100
Expect(err).NotTo(HaveOccurred())

ring.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,6 @@ func (c *Ring) SetAddrs(addrs map[string]string) {
563563
c.sharding.SetAddrs(addrs)
564564
}
565565

566-
// Do create a Cmd from the args and processes the cmd.
567-
func (c *Ring) Do(ctx context.Context, args ...interface{}) *Cmd {
568-
cmd := NewCmd(ctx, args...)
569-
_ = c.Process(ctx, cmd)
570-
return cmd
571-
}
572-
573566
func (c *Ring) Process(ctx context.Context, cmd Cmder) error {
574567
err := c.processHook(ctx, cmd)
575568
cmd.SetErr(err)

ring_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ var _ = Describe("Redis Ring", func() {
7474
Expect(ring.Close()).NotTo(HaveOccurred())
7575
})
7676

77+
It("do", func() {
78+
val, err := ring.Do(ctx, "ping").Result()
79+
Expect(err).NotTo(HaveOccurred())
80+
Expect(val).To(Equal("PONG"))
81+
})
82+
7783
It("supports context", func() {
7884
ctx, cancel := context.WithCancel(ctx)
7985
cancel()

0 commit comments

Comments
 (0)