codeconsole opened a new pull request, #16230: URL: https://github.com/apache/grails-core/pull/16230
## Summary - Replace the default FutureTask-based promise implementation with a Groovy-friendly `CompletableFuture` implementation while retaining the existing `Promise` and `PromiseFactory` APIs. - Execute Grails promises on Spring Boot's managed `applicationTaskExecutor`, including Boot lifecycle management, graceful shutdown, pool configuration, virtual-thread support, and composed task decorators. - Propagate `GrailsWebRequest` through a Spring `TaskDecorator` and remove the legacy web-promise decorator pipeline from the active execution path. - Use Spring's `StandardServletAsyncWebRequest`, `DeferredResult`, and `WebAsyncManager` for controller async lifecycle, completion, dispatch, timeout, and exception processing. - Preserve explicit user-supplied promise decorators and third-party PromiseFactory providers discovered through `ServiceLoader`. - Deprecate the retained FutureTask, raw Servlet async, legacy request decorator, and Spring factory-bean compatibility APIs for removal in a future release. - Update the async promises, async requests, and events documentation with Spring Boot configuration and migration guidance. ## LOC | Area | Added | Removed | Net | Deprecated | Net after deprecated removal | |---|---:|---:|---:|---:|---:| | Production | 467 | 88 | +379 | 1,018 | -639 | | Tests | 356 | 41 | +315 | 0 | +315 | | Documentation | 38 | 13 | +25 | 0 | +25 | | **Total** | **861** | **142** | **+719** | **1,018** | **-299** | The deprecated total includes 863 physical lines in public APIs marked `@Deprecated(forRemoval = true)` and 155 lines in the internal `FutureTaskChildPromise`, which is only required by the deprecated FutureTask implementation. ## Verification - `grails-async-core`, `grails-async`, `grails-web-url-mappings`, and `grails-spring-security` test suites pass. - Affected-module code style and dependency-version validation pass. - Checkstyle, CodeNarc, PMD, and SpotBugs aggregate reports contain no violations. - The Grails user guide renders successfully. - The repository-wide aggregate test command was run with `--continue`. Unrelated MongoDB, PostgreSQL, and Selenium/Testcontainers suites failed after Docker exhausted its available storage; all affected module entries in the consolidated report remained green. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
