Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 01:46
· 95 commits to main since this release

The last minor release before 1.0. It carries out the decisions that the 1.0 freeze checklist left open, while a minor release may still break, so that 1.0 itself only freezes. A cancelled request is answered with 503 and REQUEST_CANCELLED instead of 500, the one breaking change. ddk-db-starter is tested on PostgreSQL and MySQL and is no longer experimental, and ddk-seata-starter is deprecated ahead of its removal in 1.0. Publication metrics are sampled in the background, so their cost no longer follows the scrape rate. Native images are verified for the Redis-backed starters, projections and the publication registry, projects generated on JDK 23 and later compile Lombok, an optional ArchGuard rule keeps configuration classes outside the layers to wiring, and every starter's README starts with a 30-second setup and ends with its common errors. The upgrade guide lists the steps.

Breaking

  • A request whose thread is interrupted, which AggregateLocks and @AggregateLock report as CancellationException since 0.11.0, is answered by BaseExceptionHandler with 503 and the new error code REQUEST_CANCELLED instead of 500 and SYSTEM_ERROR. It happens, for example, when the application shuts down while a request waits for a lock: the request itself was fine and can be retried, usually on another instance, and it no longer counts as a server error in 5xx-by-code alerts on SYSTEM_ERROR. An MCP tool reports REQUEST_CANCELLED too. To keep the old response, declare an @ExceptionHandler(CancellationException.class) in your own @RestControllerAdvice that returns 500 with ApiResponse.ofFail(CommonError.SYSTEM_ERROR)

Added

  • Native images verified for the concurrency, Redis, cache and projection starters, and for listeners that run through Spring Modulith's JDBC publication registry: CI builds a second example, ddk-example-inventory, against Redis and smoke-tests it. SUPPORT.md lists what is checked
  • ddk-concurrency-starter registers, ahead of time, the reflection that the key expressions of @AggregateLock, @Idempotent and @RateLimit need on a native image: the parameter types of the annotated methods, as for JSON binding. Applications no longer register them
  • ddk.event.publications.sample.age, the seconds since the publication counts were last sampled, and the properties ddk.event.metrics.publications.enabled and ddk.event.metrics.publications.interval
  • CommonError.REQUEST_CANCELLED, answered with 503, and a 503 response in the error contract that the web starter adds to the API docs
  • CommonArchRules.WIRING_CLASSES_ONLY_WIRE, an optional rule: a @Configuration class outside the layers, which the layering rules exempt, may only declare @Bean methods or override supertype methods, and may not call a mapper of the infrastructure layer. Projects generated from the archetypes check it; existing projects can add it to their architecture test. The existing rules are unchanged

Changed

  • ddk.event.publications is sampled in the background instead of being counted on every scrape. Spring Modulith's event_publication table has no index on status, so each count scans the table; every scrape used to run four of them on every instance. A sample now runs every ddk.event.metrics.publications.interval (1 minute by default), so the database load no longer follows the scrape rate, and a value can be up to one interval old. A failed sample keeps the previous values; after three failed samples in a row the gauges report NaN. Metric names and tags are unchanged
  • ddk-db-starter is no longer experimental. Its tests now run against PostgreSQL 17 and MySQL 8.4 as two data sources of one application: each source reaches its own database, the configured one is primary, and each transaction manager commits and rolls back only its own source. The 1.0 freeze covers it like the other starters

Deprecated

  • ddk-seata-starter. 1.0 removes it from ddk-dependencies and stops publishing it: it has wiring tests only, Seata's runtime is not verified on Spring Boot 4, and global transactions go against the outbox and eventual consistency that DDK builds on. Its auto-configuration logs a warning at startup. To keep using it, pin 0.12.x or copy its three classes into your project

Fixed

  • A native image that uses Spring Modulith's JDBC publication registry starts. The event starter wraps the event multicaster to check publications outside a transaction, and created that proxy class at runtime, which a native image cannot do; the class is now generated ahead of time
  • The cache starter's local level works on a native image: it registers the Caffeine classes that its configuration builds, and the invalidation message it sends
  • Projects generated from the archetypes compile Lombok annotations on JDK 23 and later. Since JDK 23, javac no longer runs annotation processors it finds on the classpath, so @RequiredArgsConstructor and the like did nothing and compilation failed with variable ... not initialized in the default constructor. The generated pom.xml now lists Lombok under the compiler's annotationProcessorPaths, and the archetype tests check it. In a project generated earlier, add the same maven-compiler-plugin configuration (see the archetype pom.xml); list any other annotation processor you use there too, because only the listed ones run