From f174acba52ecd16202a99c99a719ced59c7337b5 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com> Date: Thu, 8 May 2025 15:32:47 +0300 Subject: [PATCH] ci(redis): update to 8.0.1 (#3372) --- .github/actions/run-tests/action.yml | 2 +- .github/workflows/build.yml | 6 +++--- main_test.go | 3 ++- search_test.go | 7 +++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 08323aa5..0696f38d 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -25,7 +25,7 @@ runs: # Mapping of redis version to redis testing containers declare -A redis_version_mapping=( - ["8.0-RC2"]="8.0-RC2-pre" + ["8.0.1"]="8.0.1-pre" ["7.4.2"]="rs-7.4.0-v2" ["7.2.7"]="rs-7.2.0-v14" ) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a58ebb9c..bde6cc72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: redis-version: - - "8.0-RC2" # 8.0 RC2 + - "8.0.1" # 8.0.1 - "7.4.2" # should use redis stack 7.4 go-version: - "1.23.x" @@ -43,7 +43,7 @@ jobs: # Mapping of redis version to redis testing containers declare -A redis_version_mapping=( - ["8.0-RC2"]="8.0-RC2-pre" + ["8.0.1"]="8.0.1-pre" ["7.4.2"]="rs-7.4.0-v2" ) if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then @@ -72,7 +72,7 @@ jobs: fail-fast: false matrix: redis-version: - - "8.0-RC2" # 8.0 RC2 + - "8.0.1" # 8.0.1 - "7.4.2" # should use redis stack 7.4 - "7.2.7" # should redis stack 7.2 go-version: diff --git a/main_test.go b/main_test.go index 556e633e..29e6014b 100644 --- a/main_test.go +++ b/main_test.go @@ -100,7 +100,8 @@ var _ = BeforeSuite(func() { fmt.Printf("RECluster: %v\n", RECluster) fmt.Printf("RCEDocker: %v\n", RCEDocker) - fmt.Printf("REDIS_VERSION: %v\n", RedisVersion) + fmt.Printf("REDIS_VERSION: %.1f\n", RedisVersion) + fmt.Printf("CLIENT_LIBS_TEST_IMAGE: %v\n", os.Getenv("CLIENT_LIBS_TEST_IMAGE")) if RedisVersion < 7.0 || RedisVersion > 9 { panic("incorrect or not supported redis version") diff --git a/search_test.go b/search_test.go index 6bc8b111..019acbe3 100644 --- a/search_test.go +++ b/search_test.go @@ -1871,17 +1871,20 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() { Expect(val).To(BeEquivalentTo("OK")) WaitForIndexing(client, "aggTimeoutHeavy") - const totalDocs = 10000 + const totalDocs = 100000 for i := 0; i < totalDocs; i++ { key := fmt.Sprintf("doc%d", i) _, err := client.HSet(ctx, key, "n", i).Result() Expect(err).NotTo(HaveOccurred()) } + // default behaviour was changed in 8.0.1, set to fail to validate the timeout was triggered + err = client.ConfigSet(ctx, "search-on-timeout", "fail").Err() + Expect(err).NotTo(HaveOccurred()) options := &redis.FTAggregateOptions{ SortBy: []redis.FTAggregateSortBy{{FieldName: "@n", Desc: true}}, LimitOffset: 0, - Limit: 100, + Limit: 100000, Timeout: 1, // 1 ms timeout, expected to trigger a timeout error. } _, err = client.FTAggregateWithArgs(ctx, "aggTimeoutHeavy", "*", options).Result()