From e78ca012734eb1eae0ddf6ffce0313745c77d995 Mon Sep 17 00:00:00 2001 From: Alex Le Date: Fri, 29 May 2026 12:05:52 -0700 Subject: [PATCH 1/3] Removed agent note Signed-off-by: Alex Le --- AGENTS.md | 1 - MIGRATION.md | 28 +---- examples/boot-iam-auth/pom.xml | 7 -- examples/boot-telemetry/pom.xml | 7 -- examples/pom.xml | 8 -- examples/spring-boot/pom.xml | 7 -- performance/pom.xml | 8 -- pom.xml | 2 +- spring-boot-starter-data-valkey/README.md | 25 +---- spring-boot-starter-data-valkey/pom.xml | 8 -- spring-data-valkey/README.md | 15 --- spring-data-valkey/pom.xml | 8 -- ...lkeyGlideZSetOrderingIntegrationTests.java | 100 ++++++++++++++++++ 13 files changed, 107 insertions(+), 117 deletions(-) create mode 100644 spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java diff --git a/AGENTS.md b/AGENTS.md index 99518cb2..4135faf8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,7 +29,6 @@ Spring Data Valkey is a Spring Data module providing first-class Valkey/Redis in **Driver Notes:** -- Valkey GLIDE requires `${os.detected.classifier}` (platform-specific JAR) and the `os-maven-plugin` build extension - Sentinel support is available in Lettuce and Jedis only — GLIDE does not support Sentinel at this time ## Architecture Quick Facts diff --git a/MIGRATION.md b/MIGRATION.md index 24c83046..510e89f5 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -32,25 +32,10 @@ Update your `pom.xml`: io.valkey valkey-glide - ${os.detected.classifier} ${version} ``` -Valkey GLIDE requires platform-specific native libraries. Add the os-maven-plugin to resolve `${os.detected.classifier}`: - -```xml - - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - - -``` - Note: You can continue using Lettuce or Jedis if preferred by setting `spring.data.valkey.client-type=lettuce` or `spring.data.valkey.client-type=jedis`. #### Gradle @@ -63,15 +48,7 @@ implementation 'org.springframework.boot:spring-boot-starter-data-redis' // After implementation 'io.valkey.springframework.boot:spring-boot-starter-data-valkey:${version}' -implementation "io.valkey:valkey-glide:${version}:${osdetector.classifier}" -``` - -Add the osdetector plugin to resolve `${osdetector.classifier}`: - -```groovy -plugins { - id 'com.google.osdetector' version '1.7.3' -} +implementation 'io.valkey:valkey-glide:${version}' ``` ### Vanilla Spring @@ -97,7 +74,6 @@ Update your `pom.xml`: io.valkey valkey-glide - ${os.detected.classifier} ${version} ``` @@ -112,7 +88,7 @@ implementation 'org.springframework.data:spring-data-redis:${version}' // After implementation 'io.valkey.springframework.data:spring-data-valkey:${version}' -implementation "io.valkey:valkey-glide:${version}:${osdetector.classifier}" +implementation 'io.valkey:valkey-glide:${version}' ``` ## Package Name Changes diff --git a/examples/boot-iam-auth/pom.xml b/examples/boot-iam-auth/pom.xml index a17a1a4d..ba1c48a3 100644 --- a/examples/boot-iam-auth/pom.xml +++ b/examples/boot-iam-auth/pom.xml @@ -29,13 +29,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - org.codehaus.mojo diff --git a/examples/boot-telemetry/pom.xml b/examples/boot-telemetry/pom.xml index 0c5533a8..5b177093 100644 --- a/examples/boot-telemetry/pom.xml +++ b/examples/boot-telemetry/pom.xml @@ -33,13 +33,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - org.codehaus.mojo diff --git a/examples/pom.xml b/examples/pom.xml index 9104cf8e..31bc2640 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -54,19 +54,11 @@ io.valkey valkey-glide - ${os.detected.classifier} ${valkey-glide.version} - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - diff --git a/examples/spring-boot/pom.xml b/examples/spring-boot/pom.xml index 86e6a92d..399759a1 100644 --- a/examples/spring-boot/pom.xml +++ b/examples/spring-boot/pom.xml @@ -29,13 +29,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - org.codehaus.mojo diff --git a/performance/pom.xml b/performance/pom.xml index 73443dec..26c45497 100644 --- a/performance/pom.xml +++ b/performance/pom.xml @@ -31,7 +31,6 @@ io.valkey valkey-glide - ${os.detected.classifier} ${valkey-glide.version} @@ -52,13 +51,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - org.apache.maven.plugins diff --git a/pom.xml b/pom.xml index bb797717..d3526dce 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 3.5.1 - 2.3.0-rc2 + 2.4.0 6.6.0.RELEASE 6.0.0 2.11.1 diff --git a/spring-boot-starter-data-valkey/README.md b/spring-boot-starter-data-valkey/README.md index b7a4c983..d9d97b29 100644 --- a/spring-boot-starter-data-valkey/README.md +++ b/spring-boot-starter-data-valkey/README.md @@ -37,40 +37,23 @@ Add the starter and Valkey GLIDE dependencies: io.valkey valkey-glide - ${os.detected.classifier} ${version} ``` -Add the os-maven-plugin for platform-specific GLIDE libraries: - -```xml - - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - - -``` - Or to your `build.gradle`: ```gradle -plugins { - id 'com.google.osdetector' version '1.7.3' -} - dependencies { implementation 'io.valkey.springframework.boot:spring-boot-starter-data-valkey:${version}' - implementation 'io.valkey:valkey-glide:${version}:${osdetector.classifier}' + implementation 'io.valkey:valkey-glide:${version}' } ``` -Note: The Valkey GLIDE dependency must also be explicitly added due to the OS classifier (platform-specific JAR). To use the Lettuce or Jedis driver instead, add their dependencies and set `spring.data.valkey.client-type` accordingly. +To use platform specific Valkey GLIDE dependency and reduce the Jar size, see Valkey GLIDE installation [guide](https://glide.valkey.io/how-to/installation?lang=java). + +To use the Lettuce or Jedis driver instead, add their dependencies and set `spring.data.valkey.client-type` accordingly. ## Getting Started diff --git a/spring-boot-starter-data-valkey/pom.xml b/spring-boot-starter-data-valkey/pom.xml index 205ce0c7..0ec6bb58 100644 --- a/spring-boot-starter-data-valkey/pom.xml +++ b/spring-boot-starter-data-valkey/pom.xml @@ -83,7 +83,6 @@ io.valkey valkey-glide - ${os.detected.classifier} ${valkey-glide.version} @@ -262,13 +261,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - diff --git a/spring-data-valkey/README.md b/spring-data-valkey/README.md index bddcd89a..7c7f3f12 100644 --- a/spring-data-valkey/README.md +++ b/spring-data-valkey/README.md @@ -31,25 +31,10 @@ Add the Spring Data Valkey and Valkey GLIDE dependencies: io.valkey valkey-glide - ${os.detected.classifier} ${version} ``` -Add the os-maven-plugin for platform-specific GLIDE libraries: - -```xml - - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - - -``` - ## Getting Started ### Basic Configuration diff --git a/spring-data-valkey/pom.xml b/spring-data-valkey/pom.xml index af579275..b9d18855 100644 --- a/spring-data-valkey/pom.xml +++ b/spring-data-valkey/pom.xml @@ -123,7 +123,6 @@ io.valkey valkey-glide - ${os.detected.classifier} ${valkey-glide.version} true @@ -325,13 +324,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.7.1 - - diff --git a/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java b/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java new file mode 100644 index 00000000..1a4e0250 --- /dev/null +++ b/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java @@ -0,0 +1,100 @@ +/* + * Copyright 2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.valkey.springframework.data.valkey.connection.valkeyglide; + +import static org.assertj.core.api.Assertions.*; + +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import io.valkey.springframework.data.valkey.connection.valkeyglide.extension.ValkeyGlideConnectionFactoryExtension; +import io.valkey.springframework.data.valkey.core.StringValkeyTemplate; +import io.valkey.springframework.data.valkey.core.ZSetOperations; +import io.valkey.springframework.data.valkey.test.condition.EnabledOnValkeyClusterAvailable; +import io.valkey.springframework.data.valkey.test.extension.ValkeyCluster; +import io.valkey.springframework.data.valkey.test.extension.ValkeyStanalone; + +/** + * Integration tests verifying that ZSet rangeWithScores operations maintain + * score-based ordering for both standalone and cluster connections. + * + * @see Issue #36 + * @see Glide #4963 + */ +class ValkeyGlideZSetOrderingIntegrationTests { + + @Test + void rangeWithScoresStandaloneOrder() { + StringValkeyTemplate template = new StringValkeyTemplate( + ValkeyGlideConnectionFactoryExtension.getConnectionFactory(ValkeyStanalone.class)); + try { + ZSetOperations opsForZSet = template.opsForZSet(); + + opsForZSet.add("testKey", "value1", 2.0); + opsForZSet.add("testKey", "value2", 1.0); + opsForZSet.add("testKey", "value3", 4.0); + opsForZSet.add("testKey", "value4", 3.0); + + Set rangeResult = opsForZSet.range("testKey", 0, 3); + String[] rangeArray = rangeResult.toArray(new String[0]); + assertThat(rangeArray[0]).isEqualTo("value2"); + assertThat(rangeArray[1]).isEqualTo("value1"); + assertThat(rangeArray[2]).isEqualTo("value4"); + assertThat(rangeArray[3]).isEqualTo("value3"); + + Set> rangeWithScoresResult = opsForZSet.rangeWithScores("testKey", 0, 3); + ZSetOperations.TypedTuple[] tuplesArray = rangeWithScoresResult.toArray(new ZSetOperations.TypedTuple[0]); + assertThat(tuplesArray[0].getValue()).isEqualTo("value2"); + assertThat(tuplesArray[1].getValue()).isEqualTo("value1"); + assertThat(tuplesArray[2].getValue()).isEqualTo("value4"); + assertThat(tuplesArray[3].getValue()).isEqualTo("value3"); + } finally { + template.delete("testKey"); + } + } + + @Test + @EnabledOnValkeyClusterAvailable + void rangeWithScoresClusterOrder() { + StringValkeyTemplate template = new StringValkeyTemplate( + ValkeyGlideConnectionFactoryExtension.getConnectionFactory(ValkeyCluster.class)); + try { + ZSetOperations opsForZSet = template.opsForZSet(); + + opsForZSet.add("testKey", "value1", 2.0); + opsForZSet.add("testKey", "value2", 1.0); + opsForZSet.add("testKey", "value3", 4.0); + opsForZSet.add("testKey", "value4", 3.0); + + Set rangeResult = opsForZSet.range("testKey", 0, 3); + String[] rangeArray = rangeResult.toArray(new String[0]); + assertThat(rangeArray[0]).isEqualTo("value2"); + assertThat(rangeArray[1]).isEqualTo("value1"); + assertThat(rangeArray[2]).isEqualTo("value4"); + assertThat(rangeArray[3]).isEqualTo("value3"); + + Set> rangeWithScoresResult = opsForZSet.rangeWithScores("testKey", 0, 3); + ZSetOperations.TypedTuple[] tuplesArray = rangeWithScoresResult.toArray(new ZSetOperations.TypedTuple[0]); + assertThat(tuplesArray[0].getValue()).isEqualTo("value2"); + assertThat(tuplesArray[1].getValue()).isEqualTo("value1"); + assertThat(tuplesArray[2].getValue()).isEqualTo("value4"); + assertThat(tuplesArray[3].getValue()).isEqualTo("value3"); + } finally { + template.delete("testKey"); + } + } +} From 9619520982abcb8eea773cd7c5ba47b370be8936 Mon Sep 17 00:00:00 2001 From: Alex Le Date: Fri, 29 May 2026 14:41:22 -0700 Subject: [PATCH 2/3] Updated driver.md Signed-off-by: Alex Le --- docs/src/content/docs/valkey/drivers.md | 4 +--- .../valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/valkey/drivers.md b/docs/src/content/docs/valkey/drivers.md index 5fc533dd..4547323f 100644 --- a/docs/src/content/docs/valkey/drivers.md +++ b/docs/src/content/docs/valkey/drivers.md @@ -73,9 +73,7 @@ The following overview explains features that are supported by the individual Va io.valkey valkey-glide - 2.3.0 - linux-x86_64 - + 2.4.0 ``` diff --git a/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java b/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java index 1a4e0250..cbb11a19 100644 --- a/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java +++ b/spring-data-valkey/src/test/java/io/valkey/springframework/data/valkey/connection/valkeyglide/ValkeyGlideZSetOrderingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 the original author or authors. + * Copyright 2026 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 9a2f388cfd40d105864adde71471d1ac0499addb Mon Sep 17 00:00:00 2001 From: Alex Le Date: Mon, 1 Jun 2026 14:13:32 -0700 Subject: [PATCH 3/3] Fixed closing tag Signed-off-by: Alex Le --- docs/src/content/docs/valkey/drivers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/valkey/drivers.md b/docs/src/content/docs/valkey/drivers.md index 4547323f..ca281518 100644 --- a/docs/src/content/docs/valkey/drivers.md +++ b/docs/src/content/docs/valkey/drivers.md @@ -74,7 +74,7 @@ The following overview explains features that are supported by the individual Va io.valkey valkey-glide 2.4.0 - + ```