Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremyprime
Copy link
Collaborator

@jeremyprime jeremyprime commented Oct 7, 2025

Summary

This PR rebrands the code for Spring Data Redis to Spring Data Valkey. This does not update the docs (src/main/antora) or CI files (Jenkinsfile, ci/).

This PR closes #12.

Key changes:

  • All code occurrences of Redis to Valkey (this includes within Java, Kotlin, resource files (schemas, config, properties, URIs, logging, etc), and project files)
  • Package name (and Java module name) from org.springframework.data.redis to io.valkey.springframework.data.valkey
  • Project name from Spring Data Redis to Spring Data Valkey
  • Group Id from org.springframework.data to io.valkey.springframework.data
  • Artifact Id from spring-data-redis to spring-data-valkey

Notable exceptions:

  • Jedis package names (redis.clients.jedis.*)
  • Lettuce class names (RedisClusterCommands, RedisClusterConnection, etc) and URI scheme (redis://)
  • Lua commands (redis.call)
  • Redis issue references (DATAREDIS)

Also updated the build (Makefile, ci.yml) to install and start the correct version of Redis/Valkey to test, and added guards to ValkeyGlideConnectionHashCommandsIntegrationTests and other tests so hash expiry tests are only run when supported by the server (plus updated logic of HEXPIREAT and HPEXPIREAT GT and LT tests).

Testing

Also ran the tests locally against Valkey 9.0.0-rc2 and they all passed:

[INFO] Results:
[INFO]
[WARNING] Tests run: 19903, Failures: 0, Errors: 0, Skipped: 1602

Next Steps

Need to apply the same rebranding to the docs, or at least whatever docs will be kept (at a minimum the README and other root-level docs need to be updated). Since rebranding is a breaking change, a migration guide and examples will also be needed to document the migration steps to move from Spring Data Redis to Spring Data Valkey.

Minor issues to address:

  • Update project URL in pom.xml once final repo is known
  • Update schema locations in XSD files once the documentation and schemas are published
  • Delete CI files (Jenkinsfile, ci/) once we confirm only GitHub actions will be used for CI

jeremyprime and others added 8 commits October 3, 2025 15:26
- Updated ValkeyGlideServerCommands to use the new invocation system
- Updated ValkeyGlideConnectionServerCommandsIntegrationTests to cover all APIs in all invocation modes

Signed-off-by: ikolomi <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/task https://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/valkey https://www.springframework.org/schema/valkey/spring-valkey-1.0.xsd">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we publish the schema to a specific location some tooling, such as IDEs, will complain that this file cannot be downloaded. The tests still run since we have a schema mapping at src/main/resources/META-INF/spring.schemas.

Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
@@ -543,6 +544,7 @@ void testHStrLen() {
// ==================== Field Expiration Operations ====================

@Test
@EnabledOnCommand("HEXPIRE")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This annotation makes sure we don't run hash expiry commands on server versions that don't support them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of classes that were updated to avoid running tests against a server that does not support that functionality:

  • ValkeyGlideConnectionHashCommandsIntegrationTests
  • ValkeyGlideConnectionFactoryIntegrationTests
  • ValkeyGlideConnectionKeyCommandsIntegrationTests
  • ValkeyGlideConnectionScriptingCommandsIntegrationTests

The guards are either on functionality (e.g., @EnabledOnCommand("HEXPIRE")) or server version (e.g., @EnabledOnValkeyVersion("7.0")).

@@ -718,7 +722,7 @@ void testHExpireAt() {
assertThat(expireResults.get(0)).isEqualTo(1);

// Test hExpire (seconds) - Test GT by setting a shorter expiry first
expireResults = connection.hashCommands().hExpireAt(keyBytes, expiredTimestamp,
expireResults = connection.hashCommands().hExpireAt(keyBytes, shorterTimestamp,
ExpirationOptions.Condition.GT, field1);
assertThat(expireResults).hasSize(1);
assertThat(expireResults.get(0)).isEqualTo(0);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HEXSPIREAT and HPEXSPIREAT GT and LT were failing on Valkey, so updated test to pass, not 100% if this is correct.

- name: Start engine
run: |
make start
make start PROJECT=${{ matrix.engine }} VERSION=${{ matrix.version }} GH_ORG=${{ matrix.engine == 'redis' && 'redis' || 'valkey-io' }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the CI always started the default in the Makefile (Redis 7.4.0), so I commented out the installation of the engine and just use the Makefile to start the desired engine. I also update the default in the Makefile to be Valkey 8.1.1.

If this is good we can remove commented out steps and action.yml since we will just be relying on Makefile to install and start engine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we should have have less Makefile and more github CI.
Since I started with switching from jenkis to github workflows, we should continue with this trend.

In the context of this fix - I would remove the work/$(PROJECT)/bin/$(PROJECT)-cli and work/$(PROJECT)/bin/$(PROJECT)-server steps from the Makefile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge this PR for now since it fixes the issue where CI was only testing Redis 7.4.0, and look at streamlining the build process later.

Signed-off-by: Jeremy Parr-Pearson <[email protected]>
@jeremyprime jeremyprime marked this pull request as ready for review October 9, 2025 19:44
@jeremyprime jeremyprime requested a review from ikolomi October 9, 2025 21:14
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
@@ -1587,7 +1589,7 @@ void testPTtlTimeUnitConversionPipeline() {
// Verify conversion relationships
if (actualPTtlHours != null && actualPTtlHours > 0) {
double hoursToMillisecondsRatio = (double) actualPTtlMilliseconds / actualPTtlHours;
assertThat(hoursToMillisecondsRatio).isBetween(3500000.0, 3700000.0); // ~3600000 ms per hour
assertThat(hoursToMillisecondsRatio).isBetween(3500000.0, 3800000.0); // ~3600000 ms per hour
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing for Redis 7.2.0:

Error:    ValkeyGlideConnectionKeyCommandsIntegrationTests.testPTtlTimeUnitConversionPipeline:1592 
Expecting actual:
  3756521.695652174
to be between:
  [3500000.0, 3700000.0]

So I increased the range by 1 second.

Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check if this new file is required

Copy link
Collaborator

@ikolomi ikolomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending the following:

  1. Double engine spin - we should use the workflow functionality, not the Makefile
  2. There are new and deleted files. Theoretically we should have only the renames. Please verify that these additions and deletions are indeed needed.

@jeremyprime jeremyprime merged commit 25eff6d into valkey-io:main Oct 22, 2025
41 of 43 checks passed
@jeremyprime jeremyprime deleted the rebranding branch October 22, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Rebranding

2 participants