Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 12:23
· 2 commits to main since this release

What happens after a failure, and tenants carried all the way through. Everything is an addition and off by default where it changes behavior: a way out for messages and publications that keep failing, tenant-scoped cache, idempotency and rate-limit keys, an expiry index and batched cleanup for the processed message table, a Grafana dashboard and alert rules, ddk.web.not-found-as-404, and reproducible builds, so the files on Maven Central match the GitHub Release byte for byte. The tracer starter leaves preview; the MCP starter stays one. Two fixes change a response: a constraint on a controller parameter now gives VALIDATION_ERROR, and a page sorted by a field that is no column of the PO gives 400 VALIDATION_ERROR instead of 500. The upgrade guide lists both and how to roll back; 1.0.x and 1.1 can run side by side on the same database. The outside trial the roadmap asked for before 1.1 was waived by the maintainer, as recorded in the roadmap.

Added

  • A way out for a RocketMQ message that always fails. With ddk.event.rocketmq.consumer.max-attempts, a message that fails that many times in a consumer group goes to the application's UndeliverableEventHandler, with its headers, its body as received and the last exception. If the handler returns, the message counts as consumed and an orderly queue moves on; if it throws, the message is retried as before. Setting a limit without a handler fails at startup, because DDK never drops a message on its own. The default, 0, keeps the old behavior: an orderly queue waits until the message succeeds
  • ddk.event.maintenance.resubmit-max-attempts: a failed publication that has been tried that many times, the first publication included, is no longer resubmitted and stays FAILED. The default, 0, resubmits without limit as before
  • Keys that carry the tenant, off by default. With ddk.cache.tenant-scoped, a cache keeps one entry per tenant from OperatorContext (<prefix><cache>::@<tenant>:<key>) and a call without a tenant fails; ddk.cache.caches.<name>.tenant-scoped turns it off for data that all tenants share. With ddk.concurrency.tenant-scoped, the keys of @Idempotent and @RateLimit carry the tenant, so each tenant has its own request ids and its own quota; calls without a tenant share one. @AggregateLock is unchanged. ddk-example-inventory has a tenant profile with sales channels as tenants, checked on the JVM and in the native image smoke test
  • An expiry index on processed_at for the processed message table, created on startup, also for a table an earlier version created. ddk.event.maintenance purges the table in batches of ddk.event.maintenance.inbox-purge-batch-size (1,000) that commit one by one, so a large backlog no longer turns into one long DELETE. IdempotentConsumer.purgeOlderThan(Duration, int) and prepare(boolean) are new; with ddk.event.inbox.initialize-schema=false a missing index is logged with the statement that adds it
  • monitoring/: a Grafana dashboard for projections, integration events and the two-level cache, and Prometheus alert rules for failing and lagging projections, failed publications, stuck consumer groups, send errors and Redis errors, with promtool unit tests that CI runs. ddk-example-inventory exposes /actuator/prometheus, and a test checks that the metrics the dashboard and the rules use appear there
  • evals/: an evaluation set for coding agents. Four tasks on projects generated from the archetypes: a new aggregate on four and on three layers, a change to an existing table, and a prompt that suggests breaking a layering rule. Hidden tests grade the result; the architecture test and existing migrations must stay unchanged. scripts/run-agent-eval.py --agent CMD runs an agent; CI checks that every grader fails on the bare project and passes with the task's reference solution
  • ddk.web.not-found-as-404, off by default: a BusinessException whose code is NOT_FOUND or ends in _NOT_FOUND, such as ORDER_NOT_FOUND, gets 404 instead of 400, with the same body and code, and the API docs list a 404 response. BaseExceptionHandler(boolean) is the new constructor behind it; the no-argument constructor keeps 400 for every business error
  • Reproducible builds. project.build.outputTimestamp is set, and scripts/set-release-version.sh sets it to the commit time of the release tag, in the release workflow and in the maintainer's build for Maven Central alike, so both produce the same files byte for byte. CI rebuilds every change and compares the files with maven-artifact-plugin. After a release, scripts/check-release-checksums.py X.Y.Z compares the SHA-256 of every file of the GitHub Release with the file on Maven Central

Fixed

  • Projects generated from the archetypes had no .gitignore, so git add -A committed target/. They now ignore build output, IDE files and .claude/settings.local.json; the skills under .claude/skills/ stay tracked. Both Maven's resources plugin and the archetype plugin drop .gitignore by default, so the archetype build turns that off, and the archetype integration tests check that the file is generated
  • A constraint on a controller parameter, such as @RequestParam("q") @Size(max = 5) or @PathVariable("id") @Positive, failed with 400 BAD_REQUEST and the generic message Bad Request, because Spring MVC reports it as HandlerMethodValidationException and the fallback handler answered it like any other MVC error. It is now 400 VALIDATION_ERROR with each parameter under the name used in the request, as for @Valid request bodies. The HTTP status is unchanged; a client that matched BAD_REQUEST for these requests sees the documented CommonError code instead
  • The ID generators in ddk-example-user and ddk-mall called Hutool's IdUtil.getSnowflakeNextId(), which ignores ddk.mybatis.worker-id and datacenter-id, although their comments said to set them for several instances. They now use the IdentifierGenerator that the MyBatis starter registers, the one behind IdType.ASSIGN_ID, and a test checks that the configured worker and data center end up in the IDs
  • The native image of ddk-example-inventory never exited after SIGTERM: on JDK 25, Netty frees direct buffers through Arena.ofShared, which a native image supports only with -H:+SharedArenaSupport, so Lettuce's event loop threads failed during shutdown. The example now sets the build argument, SUPPORT.md says when an application needs it, and the native smoke test fails when the application does not stop within 30 seconds
  • A projection mark that keeps failing no longer drops out of ddk.projection.failing and Projections.failures when its entry changes again. A new mark reset the attempt count and the last error, so an entry that changed often and never refreshed looked healthy. A new mark now makes the entry due at once and keeps both, until a refresh succeeds
  • scripts/ddk.sh failed on JDK 21 updates before 21.0.8, deep in the Error Prone compiler, because it built every version from source. It now downloads a release from 0.10.0 on from Maven Central, which needs only Java 21, and checks for JDK 21.0.8 before it builds a snapshot from source. Releases before 0.10.0 still build on any JDK 21
  • GenericRepository.page only sorts by a column of the repository's PO. A sort field may be the property name or the column name, and a column renamed with @TableField now sorts correctly. A field that is not a column, or a column marked @TableField(select = false), fails with VALIDATION_ERROR, which the web starter answers with 400. Before, an unknown field reached the database and came back as 500 SYSTEM_ERROR. A column that is never selected, such as a password hash, could also be used to sort, and the order of the results gave away its relative values. QueryParser.parse(query, entityClass) is the new overload behind this; parse(query) keeps the identifier check only
  • ddk.event.consume.failures{group} no longer stays at its last value when a rebalance moves a failing queue to another instance. The failures were cleared only by a success on the same instance, so the gauge kept reporting a queue this instance no longer consumed until it restarted, an alert that could not be cleared. A queue that has not failed on this instance for five minutes no longer counts; orderly consumption retries every second, so a queue that is still stuck here keeps counting

Changed

  • Generated projects, after a trial run of the 1.0.1 archetype: the skills for a new aggregate or feature have the application pre-generate IDs through an *IdGenerator port backed by the MyBatis starter's IdentifierGenerator, so events raised on creation carry the ID; they used to suggest IdType.ASSIGN_ID, which leaves the new aggregate without an ID until it is inserted. AGENTS.md and the skills say that a domain event needs Instant occurredOn, and the README explains the three warnings a new project logs at startup, that Long fields are JSON strings, and how to add API docs
  • The tracer starter is no longer a preview, as COMPATIBILITY.md set out: export is tested in CI against an OpenTelemetry Collector container, which receives a request and its @Async work as one trace. Its properties and behavior now follow the same compatibility rules as the other starters
  • Preview change, MCP starter: the audit log names the operator and tenant of each tool call, MCP tool [cancel_order] by [support] in tenant [-] -> SUCCESS in 12 ms, with - when there is none. The tool interception now wraps @Idempotent, @AggregateLock and @RateLimit on the same method, so arguments are checked first and a repeated request, a busy aggregate or a rate limit comes back to the agent with its error code and is audited. ddk-mall's cancel_order takes a requestId and is @Idempotent, so an agent that retries after a timeout does not cancel twice
  • Redisson 4.8.0 (was 4.7.0) and ShedLock 7.12.0 (was 7.10.1). Both are minor updates with no change to the API that DDK or applications use; ShedLock retries extending a kept-alive lock after a transient failure.
  • Patch updates on the same lines: Spring Boot 4.1.3 (was 4.1.2), Spring AI 2.0.3 (was 2.0.2), Spring Modulith 2.1.3 (was 2.1.2), MyBatis-Plus 3.5.19 (was 3.5.18.1) and springdoc 3.2.1 (was 3.2.0). Projects generated from the archetypes use Spring Boot 4.1.3. DDK stays on Spring Boot 4.1 in 1.1; the MCP protocol is still 2025-11-25.