ruthst00 opened a new pull request, #16803: URL: https://github.com/apache/grails-core/pull/16803
## Description <!-- Describe your change and the problem it solves. Link to the related issue(s) if they exist. --> ### Root Cause The Grails datasource documentation examples select HikariCP but configure Tomcat JDBC Pool properties that are silently ignored. - The [published Grails 7.0.0 documentation](https://grails.apache.org/docs/7.0.0/guide/conf.html#dataSource) explicitly sets: ```groovy type = "com.zaxxer.hikari.HikariDataSource" ``` but then uses `maxActive`, `minIdle`, `maxIdle`, `maxWait`, and `jdbcInterceptors`, among other Tomcat-specific settings. - The same mismatch remains in this checkout at [`dataSource.adoc:63–81`](/Users/ruthes00/github/grails-core/grails-doc/src/en/guide/conf/dataSource.adoc#L63), and again in the advanced example. - Grails does __not__ translate these pool settings into HikariCP equivalents. [`DataSourceBuilder.java:100–119`](/Users/ruthes00/github/grails-core/grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/jdbc/DataSourceBuilder.java#L100) defines aliases for connection properties such as `url → jdbcUrl` and `dbProperties ↔ dataSourceProperties`, but not the pool properties reported in the issue. I also checked the corresponding source on `7.0.x`. ### The Fix - Updated both datasource examples to use valid HikariCP settings. - Clarified that Tomcat pool properties are not translated into HikariCP equivalents. - Corrected JMX guidance and removed Tomcat-specific tuning advice. - Added a regression test covering the documented pool and driver properties. Fixes [#15761](https://github.com/apache/grails-core/issues/15761) Generated with [GPT 6 Astra](https://openai.com/index/gpt-6-astra/) via [Cline API Provider](https://cline.bot/) in [IntelliJ IDEA 2025.3.3](https://blog.jetbrains.com/idea/2026/02/intellij-idea-2025-3-3/) ### Rollout **The fix belongs on `7.0.x` first, then should be merged forward into the later release branches.** It is a correction to documentation already incorrect in Grails 7.0.0, not a new feature requiring Grails 8. The `7.0.x` branch currently declares **`7.0.18-SNAPSHOT`**, so **7.0.18 would be the earliest candidate release**, **if another 7.0 patch is planned**. There is a scheduling caveat: the public [support schedule](https://grails.apache.org/support-schedule.html) already lists all Grails 7 lines as end-of-support. Therefore: - **Fix origin:** `7.0.x`, preserving the correction through merge-ups. - **Next supported release containing it:** the next **8.0.x** release. - **Do not promise 7.0.18:** a snapshot version on a branch does not guarantee another release. Since this is documentation-only, maintainers could also republish corrected Grails 7 documentation without releasing new framework binaries. ## Contributor Checklist Please review the following checklist before submitting your pull request. Pull requests that do not meet these requirements may be closed without review. ### Issue and Scope - [X] This PR is linked to an existing issue that has been **acknowledged or approved** by the project team. If no approved issue exists, please give background on why this change is necessary. Tickets are preferred for release change log history. - [X] This PR addresses the **complete scope** of the linked issue. Partial implementations or unfinished work should not be submitted for review. - [X] This PR contains a **single, focused change**. Unrelated changes should be submitted as separate pull requests. - [X] This PR targets the **correct branch** for the type of change: - **Patch release branches** (e.g., `7.0.x`): Bug fixes only. No new features or API changes. - **Minor release branches** (e.g., `7.1.x`): New features are welcome, but breaking existing APIs must be avoided. - **Major release branches** (e.g., `8.0.x`): Reserved for major changes. Breaking API changes are permitted. ### Code Quality - [X] I have **added or updated tests** that cover the changes introduced in this PR. All code contributions are expected to include appropriate test coverage. - [X] I have verified that all existing tests pass by running `./gradlew build --rerun-tasks`. - [X] My code follows the project's **code style** guidelines. I have run `./gradlew codeStyle` and resolved any violations. See [Code Style](../CONTRIBUTING.md#code-style) for details. - [X] This PR does **not** include mass reformatting, style-only changes, or large-scale refactoring unless it was **explicitly approved** in the linked issue. Unsolicited reformatting will not be accepted. - [X] If generative AI tooling was used in preparing this contribution, a quality model was used to ensure contributions are **consistent with the project's quality standards**. ### Licensing and Attribution - [X] All contributed code is provided under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), and new source files include the appropriate **Apache license header**. - [X] I have the necessary rights to submit this contribution and confirm it is my own original work (see [Legal Notice](../CONTRIBUTING.md#i-want-to-contribute)). - [X] If generative AI tooling was used in preparing this contribution, I have followed the [Apache Software Foundation's policy on generative tooling](https://www.apache.org/legal/generative-tooling.html) and have properly attributed its use. ### Documentation - [X] If this PR introduces user-facing changes, I have included or updated the relevant documentation. - [] If this PR adds a new feature, I have updated the **What's New** section of the Grails Guide. - [ ] If this PR introduces breaking changes or changes that require user action during an upgrade, I have updated the **Upgrade Notes** for the corresponding version in the Grails Guide. - [X] The PR description clearly explains **what** was changed and **why**. -- 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]
