Skip to content

Upgrade to Spring Boot 4 / Spring Framework 7#95

Open
jeremyprime wants to merge 1 commit into
valkey-io:mainfrom
jeremyprime:upstream-sync-4.1
Open

Upgrade to Spring Boot 4 / Spring Framework 7#95
jeremyprime wants to merge 1 commit into
valkey-io:mainfrom
jeremyprime:upstream-sync-4.1

Conversation

@jeremyprime

@jeremyprime jeremyprime commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Syncs spring-data-valkey with upstream Spring Data Redis 4.1.0 / Spring Boot 4.0.7 / Spring Framework 7.

Closes #84

Changes

New features:

  • @ValkeyListener / @EnableValkeyListeners — annotation-driven pub/sub messaging
  • ValkeyMessageSendingTemplate — simplified pub/sub publishing
  • SetCondition / compareAndSet — value-based conditional SET operations
  • HGETDEL, HGETEX, HSETEX — hash field expiration commands
  • DELEX / DIGEST — conditional delete and value digest
  • XACKDEL / XDELEX — stream deletion with policies
  • SINTERCARD — set intersection cardinality
  • Cache ResetStrategy — fine-grained cache invalidation
  • Jackson 3 dual-mode support (JacksonHashMapper, JacksonJsonValkeySerializer)

Dependency upgrades:

Dependency From To
Spring Data Redis 3.5.1 4.1.0
Spring Boot 3.5.1 4.0.7
Jedis 6.x 7.4.1
Lettuce 7.1.x 7.5.2
JUnit 5.11 6.0.3
JSpecify 1.0.0
Jackson 3 3.1.4 (alongside Jackson 2)

Infrastructure:

  • JSpecify null-safety annotations replacing Spring's @Nullable (~4,200 additions)
  • JUnit 6 @ParameterizedClass replacing custom @ParameterizedValkeyTest framework
  • Removed .mvn/extensions.xml (Develocity extension we don't use)

Implementation Details

1,072 files changed (98 added, 948 modified, 23 deleted)

GLIDE driver (our code, 55 files):

  • Implemented all 11 new interface methods from 4.1.0
  • Added integration tests with @EnabledOnCommand gating for server version compatibility
  • All existing GLIDE functionality preserved — no regressions in GLIDE content

Boot starter (83 files):

  • ValkeyAnnotationDrivenConfiguration for @ValkeyListener auto-configuration
  • ValkeyMessageListenerContainerConfigurer with spring.data.valkey.listener.* properties
  • Test structure: GLIDE (default, 40 tests), Lettuce (49 tests), Jedis (23 tests) — split by client-type property
  • VALKEYGLIDE enum restored in ValkeyProperties.ClientType

Upstream sync (mechanical, ~900 files):

  • JSpecify annotations on all public API signatures
  • Upstream javadoc/comment improvements
  • Method signature changes (generics bounds, @Nullable return types)
  • New command implementations in Lettuce/Jedis adapters

Rebranding maintenance:

  • redis.iovalkey.io link corrections (~2,000)
  • Variable/method name regressions fixed (upstream reintroduced redis names)
  • All new public API surface verified Valkey-branded

Known risks:

  • JUnit 5 → 6: test infrastructure rewrite (@ParameterizedClass, lifecycle changes)
  • Jedis 6 → 7 / Lettuce 6 → 7: major version bumps with API changes
  • Jackson 3 is additive only — Jackson 2 NOT removed, no breaking changes

Testing

  • Main module: 24,123 tests, 0 failures
  • Boot starter: 174 tests, 0 failures
  • Examples: 15/15 pass

AI-Assisted Sync Tooling

This upgrade was performed with AI-assisted orchestration. The tooling and rules are committed under .kiro/agents/ for reuse in future upstream syncs:

  • .kiro/agents/rules/rename-rules.md — rebranding exclusions and naming conventions
  • .kiro/agents/rules/spring-boot-4.md — version-specific mapping tables and scope

@jeremyprime
jeremyprime force-pushed the upstream-sync-4.1 branch 17 times, most recently from bd7ce90 to c49ad61 Compare July 13, 2026 22:26
@jeremyprime
jeremyprime marked this pull request as ready for review July 13, 2026 22:57
- Upgrade Spring Data Redis 3.5.1 → 4.1.0
- Upgrade Spring Boot 3.5.1 → 4.0.7
- Upgrade Jedis 6 → 7.4.1, Lettuce 6 → 7.5.2, JUnit 5 → 6.0.3
- Implement new APIs: @ValkeyListener, SetCondition, hash field expiration, DELEX/DIGEST, XDELEX/XACKDEL
- Add GLIDE implementations for all new interface methods
- Sync docs from upstream Antora to Starlight (new pub/sub pages, Jackson 3)
- Rebrand all Redis → Valkey in new/updated files
- Full test suite passing

Signed-off-by: Jeremy Parr-Pearson <jeremy.parr-pearson@improving.com>
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.

Upgrade to Spring Boot 4 / Spring Framework 7

1 participant