From 6aaa879f355d75e93c0f63761fc1fc76b41ba1b8 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 16:12:17 +0000 Subject: [PATCH 1/6] 8.8 (unstable) CI --- .github/workflows/integration.yml | 2 +- tests/dockers/.env.v8.8 | 6 ++++++ tests/dockers/docker-compose.yml | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tests/dockers/.env.v8.8 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9da953c0..db1aab70 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -26,7 +26,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - redis-version: [ '8.6', '8.4', '8.2', '7.4', '7.2', '6.2'] + redis-version: [ '8.8', '8.6', '8.4', '8.2', '7.4', '7.2', '6.2'] dotnet-version: ['8.0', '9.0', '10.0'] env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true diff --git a/tests/dockers/.env.v8.8 b/tests/dockers/.env.v8.8 new file mode 100644 index 00000000..c98e391f --- /dev/null +++ b/tests/dockers/.env.v8.8 @@ -0,0 +1,6 @@ +# Environment variables for Redis 8.8 +# Used by the run-tests GitHub Action + +# Redis CE image version (Redis 8+ includes modules natively) +CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:unstable-23321515778-debian + diff --git a/tests/dockers/docker-compose.yml b/tests/dockers/docker-compose.yml index d027f704..c892dac5 100644 --- a/tests/dockers/docker-compose.yml +++ b/tests/dockers/docker-compose.yml @@ -3,7 +3,7 @@ services: redis: - image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:8.4-GA-pre.3} + image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:unstable-23321515778-debian} container_name: redis-standalone environment: - TLS_ENABLED=yes @@ -21,7 +21,7 @@ services: - all cluster: - image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:8.4-GA-pre.3} + image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:unstable-23321515778-debian} container_name: redis-cluster environment: - REDIS_CLUSTER=yes From 44c9514508d13bdefd71460f95671a722545968a Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 16:29:59 +0000 Subject: [PATCH 2/6] fix CI --- tests/NRedisStack.Tests/EndpointsFixture.cs | 18 ++++++++++++++++++ tests/NRedisStack.Tests/Search/SearchTests.cs | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/NRedisStack.Tests/EndpointsFixture.cs b/tests/NRedisStack.Tests/EndpointsFixture.cs index 44cdedb0..75979e47 100644 --- a/tests/NRedisStack.Tests/EndpointsFixture.cs +++ b/tests/NRedisStack.Tests/EndpointsFixture.cs @@ -67,6 +67,24 @@ public static IEnumerable StandaloneOnly() public static Version RedisVersion = new(Environment.GetEnvironmentVariable("REDIS_VERSION") ?? "0.0.0"); + public static bool IsAtLeast(int major, int minor = 0, int build = 0, int revision = 0) + { + var version = RedisVersion; + if (version.Major > major) return true; + if (version.Major < major) return false; + + // if here, we're a match on major; test minor + if (version.Minor > minor) return true; + if (version.Minor < minor) return false; + + // if here, we're a match on minor; test build + if (version.Build > build) return true; + if (version.Build < build) return false; + + // if here, we're a match on build; test revision + return version.Revision >= revision; + } + public EndpointsFixture() { if (redisEndpointsPath != null && File.Exists(redisEndpointsPath)) diff --git a/tests/NRedisStack.Tests/Search/SearchTests.cs b/tests/NRedisStack.Tests/Search/SearchTests.cs index 644a36d2..1aa0f503 100644 --- a/tests/NRedisStack.Tests/Search/SearchTests.cs +++ b/tests/NRedisStack.Tests/Search/SearchTests.cs @@ -31,6 +31,7 @@ private static void SkipClusterPre8(string endpointId) // is released as part of Redis v8.2.x Assert.SkipWhen(endpointId == EndpointsFixture.Env.Cluster && !EndpointsFixture.IsEnterprise + && EndpointsFixture.RedisVersion.Major == 8 && EndpointsFixture.RedisVersion.Minor < 4, "Ignoring cluster tests for FT.SEARCH pre Redis 8.4"); } @@ -1662,7 +1663,8 @@ public void TestDropIndex(string endpointId) Assert.NotNull(ex); Assert.IsType(ex); - Assert.Contains("no such index", ex.Message, StringComparison.OrdinalIgnoreCase); + var fault = EndpointsFixture.IsAtLeast(8, 8) ? "index not found" : "no such index"; + Assert.Contains(fault, ex.Message, StringComparison.OrdinalIgnoreCase); } private int DatabaseSize(IDatabase db) => DatabaseSize(db, out _); From f47538125f38108eaadbaaf81b7c16ac865949b5 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 16:30:46 +0000 Subject: [PATCH 3/6] and another --- tests/NRedisStack.Tests/Search/SearchTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/NRedisStack.Tests/Search/SearchTests.cs b/tests/NRedisStack.Tests/Search/SearchTests.cs index 1aa0f503..977e810f 100644 --- a/tests/NRedisStack.Tests/Search/SearchTests.cs +++ b/tests/NRedisStack.Tests/Search/SearchTests.cs @@ -1728,7 +1728,8 @@ public async Task TestDropIndexAsync(string endpointId) Assert.NotNull(ex); Assert.IsType(ex); - Assert.Contains("no such index", ex.Message, StringComparison.OrdinalIgnoreCase); + var fault = EndpointsFixture.IsAtLeast(8, 8) ? "index not found" : "no such index"; + Assert.Contains(fault, ex.Message, StringComparison.OrdinalIgnoreCase); } [Theory] From 53f4db29b13bb49cdfa69482b2b2691ca188dd58 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 16:48:58 +0000 Subject: [PATCH 4/6] compensate for how Version parsing works --- tests/NRedisStack.Tests/EndpointsFixture.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/NRedisStack.Tests/EndpointsFixture.cs b/tests/NRedisStack.Tests/EndpointsFixture.cs index 75979e47..43cf3857 100644 --- a/tests/NRedisStack.Tests/EndpointsFixture.cs +++ b/tests/NRedisStack.Tests/EndpointsFixture.cs @@ -70,19 +70,24 @@ public static IEnumerable StandaloneOnly() public static bool IsAtLeast(int major, int minor = 0, int build = 0, int revision = 0) { var version = RedisVersion; - if (version.Major > major) return true; - if (version.Major < major) return false; + // note: watch out for negative numbers (means "undefined") from parsing n-part strings + var test = Math.Max(version.Major, 0); + if (test > major) return true; + if (test < major) return false; // if here, we're a match on major; test minor - if (version.Minor > minor) return true; - if (version.Minor < minor) return false; + test = Math.Max(version.Minor, 0); // interpret "9" as "9.0" + if (test > minor) return true; + if (test < minor) return false; // if here, we're a match on minor; test build - if (version.Build > build) return true; - if (version.Build < build) return false; + test = Math.Max(version.Build, 0); // interpret "9.0" as "9.0.0" + if (test > build) return true; + if (test < build) return false; // if here, we're a match on build; test revision - return version.Revision >= revision; + test = Math.Max(version.Revision, 0); // interpret "9.0.0" as "9.0.0.0" + return test >= revision; } public EndpointsFixture() From aba1bdcc88f22ed6064dfa294ff17edffda280dd Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 16:58:13 +0000 Subject: [PATCH 5/6] compensate CI for changes to `info search` output --- tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs b/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs index 956095fb..f80c17e4 100644 --- a/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs +++ b/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs @@ -103,7 +103,9 @@ public void InfoSearchSection(string endpointId) IServer server = getAnyPrimary(muxer); var searchInfo = server.Info("search"); - CustomAssertions.GreaterThan(searchInfo.Length, 8); + // v8.8 reduces a lot of noise around "info search" output + var expectCount = EndpointsFixture.IsAtLeast(8, 8) ? 3 : 8; + CustomAssertions.GreaterThan(searchInfo.Length, expectCount); } } \ No newline at end of file From cdfc87a3467f90b38f750eeccceb86ee54c450c5 Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Fri, 20 Mar 2026 17:01:13 +0000 Subject: [PATCH 6/6] counting is hard --- tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs b/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs index f80c17e4..7cbe7b3f 100644 --- a/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs +++ b/tests/NRedisStack.Tests/CommunityEditionUpdatesTests.cs @@ -104,7 +104,7 @@ public void InfoSearchSection(string endpointId) var searchInfo = server.Info("search"); // v8.8 reduces a lot of noise around "info search" output - var expectCount = EndpointsFixture.IsAtLeast(8, 8) ? 3 : 8; + var expectCount = EndpointsFixture.IsAtLeast(8, 8) ? 2 : 8; CustomAssertions.GreaterThan(searchInfo.Length, expectCount); }