You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/06/11 18:41:15 UTC
[PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
jamesfredley opened a new pull request, #15731:
URL: https://github.com/apache/grails-core/pull/15731
## Summary
This PR expands the Hibernate 7 functional-test path and closes several parity gaps found while running the functional applications against Hibernate 7. The branch targets `8.0.x-hibernate7` and includes the functional matrix work plus follow-up fixes, documentation, and review-gate cleanup.
The main outcome is that Hibernate 5 and Hibernate 7 functional lanes can run from the same workflow while known H7-incompatible general projects remain explicitly excluded until their association-rendering, unique-constraint, and datasource gaps are fixed.
## Detailed issue coverage
| Area | Issue | Why it is an issue | How it manifests | Fix in this PR |
|---|---|---|---|---|
| Functional CI matrix | General functional tests were not consistently exercised against both Hibernate 5 and Hibernate 7. | Hibernate 7 regressions could be hidden because the broad application test suite mostly validated the Hibernate 5 dependency path. | CI could publish artifacts even when the H7 functional lane was not part of the publish dependency chain. | Adds the H5 and H7 functional jobs to the publish dependency gate and wires the functional-test configuration so H7 can substitute the Hibernate 7 BOM where appropriate. |
| H7 dependency routing | General test applications need Hibernate 7 constraints when `-PhibernateVersion=7` is selected. | Without BOM substitution, applications can still resolve Hibernate 5 aligned constraints or incompatible dependency combinations. | H7 functional runs fail during dependency resolution or boot with mismatched Hibernate and Micronaut platform dependencies. | Redirects the default BOM to `grails-hibernate7-bom` for eligible general functional tests and aligns the H7 Hibernate version to `7.2.7.Final`. |
| Known H7-incompatible apps | `datasources`, `views-functional-tests`, and `scaffolding-fields` are not safe to run as generic H7 substitution projects yet. | Enabling them would turn known uncovered behavior into noisy CI failures instead of actionable coverage. | Datasources still needs explicit H7 duplicates for some coverage; views/scaffolding boot with substitution but fail on association rendering and unique-constraint behavior. | Keeps those projects in `h7IncompatibleProjects` and documents the reason for each exclusion directly in `gradle/functional-test-config.gradle`. |
| Forge analytics dependencies | Forge analytics Postgres was using the old Micronaut BOM coordinate. | The old coordinate does not match the platform coordinate used by current Micronaut dependency management. | H7 functional/Forge dependency resolution can fail or pull inconsistent dependency constraints. | Switches to `io.micronaut.platform:micronaut-platform` and centralizes the Testcontainers version used by the Forge H7 path. |
| H7 application boot | Some functional test apps still carried Hibernate 5 specific configuration. | H5-specific cache/autoconfiguration prevents the same app from proving H7 behavior. | H7 app boot fails before specs can exercise GORM behavior. | Registers H7 autoconfiguration, removes H5-specific Ehcache assumptions, and updates H7 functional app configuration. |
| Safe HQL usage | Some functional specs used ambiguous plain String HQL forms where the H7 API expects parameterized or safer overloads. | Hibernate 7 query construction is stricter and the GORM API intentionally steers callers away from unsafe interpolation patterns. | `executeQuery` or related calls fail with unsupported or unsafe String HQL usage. | Updates affected specs to use safe HQL overloads and correct application class setup. |
| DetachedCriteria single-result behavior | Hibernate 7 throws when `getSingleResult()` returns more than one row. | GORM's historical behavior is to return the first matching row for single-result helpers where multiple rows can match. | `DetachedCriteria.get()` can throw `NonUniqueResultException` in H7 where H5 returned one result. | Adjusts H7 query handling so single-result paths limit to one row or otherwise match the GORM contract. |
| Managed collection identity | Hibernate 7 is stricter about multiple representations of the same collection. | GORM add-to/save flows must not leave duplicate collection wrappers in the session. | Cascade/add-to functional specs can fail with `Found two representations of same collection`. | Fixes the H7 managed-entity add-to/save path so the bidirectional collection state remains consistent. |
| Aggregate query result typing | H7 enforces selected result type more strictly than H5. | Aggregate HQL like `avg`, `max`, `min`, and `sum` does not return the domain entity type. | Data service aggregate queries fail with incorrect result type errors. | Routes aggregate/projection HQL through query creation that lets Hibernate return the correct scalar type. |
| Cross-property arithmetic | H7 SQM typing is stricter for numeric property comparisons. | GORM where queries comparing differently typed numeric expressions need explicit type handling. | Expressions such as `pageCount > price * 10` can fail with coercion errors. | Updates the H7 where/query handling so cross-property arithmetic comparisons work under H7. |
| `findWhere` result limiting | H7 `findWhere` did not reliably limit duplicate matches to a single row. | `findWhere` is a single-result convenience API and should not allow duplicate matches to produce multiple-row failures. | Duplicate rows matching the property map can throw or behave differently from H5. | Forces `findWhere` to set `max: 1` internally and adds SQL-capture coverage proving the generated query includes the row limit. |
| Null values in `findWhere` and `findAllWhere` | The generated HQL treated null map values as named parameters. | In SQL/HQL, `= null` does not match null rows; it must be `is null`. | `findWhere(nullableProperty: null)` and `findAllWhere(nullableProperty: null)` fail to find rows with null values. | Generates `is null` for null values and removes those values from named parameters. |
| Property-map query safety | Property names from `findWhere` and `findAllWhere` were interpolated into HQL without validation. | Property-map keys are caller input at the API boundary and should not become arbitrary HQL fragments. | Invalid or malicious keys could produce malformed HQL or unsafe generated query text. | Validates every key against the persistent entity before building HQL and tests invalid property names. |
| `getAll` ordering with convertible ids | H7 converted ids before querying but reconstructed results with the original id values. | When callers pass string ids for numeric identifiers, the returned row map is keyed by converted ids. | `getAll(["3", "1", "2"])` can return nulls or the wrong order even though those rows exist. | Reconstructs the result list using converted ids and documents that existing ids preserve caller order. |
| HQL query settings | H7 HQL helpers only partially applied common GORM query settings. | Users expect settings such as `fetchSize`, `timeout`, `readOnly`, `cache`, `max`, `offset`, `flushMode`, and `lock` to behave consistently. | String values for `max` or `offset` can fail casts, `cache` might not be applied, and `lock` was not filtered from named parameters. | Converts string/number/boolean setting values, applies all supported settings, maps `lock: true` to pessimistic write locking, disables query cache for locked queries, and filters `lock` from query parameters. |
| TCK spec migration | Some migrated H7 TCK specs had missing imports or stale registration code. | The H7 TCK specs must compile and exercise the same public behavior as the source TCK specs. | Specs fail at compile time or register the wrong domain set. | Restores required `HibernateGormDatastoreSpec` imports, removes duplicate setup, and narrows Spock imports. |
| H7 has-many support class | `Something.groovy` referenced `Book` without the required imported package. | Test support classes must compile in isolation under the H7 module. | Compilation can fail because `Book` is in `grails.gorm.tests.hasmany`, not the support class package. | Adds the explicit `Book` import. |
| Multitenancy package scanning | The multitenancy spec scanned the spec package instead of the package containing the support domain and services. | The datastore only discovers classes in the package it scans. | Services or domain classes can be missing when the spec starts the datastore. | Imports the support classes explicitly and scans `Department.getPackage()`. |
| Public documentation | The H7 behavior changes were not reflected in the user-facing docs. | Users need documented contracts for query settings, finder null handling, property validation, lock behavior, and `getAll` ordering. | The reference pages understate supported settings or omit the new null/order behavior. | Updates the Hibernate 7 guide and Grails reference docs for HQL settings, `lock`, `findWhere`, `findAllWhere`, and `getAll`. |
| Historical bug report | `H7_GORM_BUG_REPORT.md` was useful triage context but lacked an Apache header and read like current expected failure status. | New source files need ASF licensing, and stale present-tense failure statements mislead reviewers. | RAT/compliance review would fail, and readers could think fixed failures are still expected. | Adds the Apache/SPDX Markdown header, frames the report as historical triage rationale, and normalizes dash typography. |
## Verification
- `git diff --check origin/8.0.x-hibernate7...HEAD` completed with no output.
- Dash typography search in `H7_GORM_BUG_REPORT.md` completed with no output.
- Markdown LSP diagnostics for `H7_GORM_BUG_REPORT.md` found no diagnostics.
- Java LSP diagnostics for `HqlQueryMethods.java` and `SelectHqlQuery.java` found no diagnostics.
- Groovy/AsciiDoc LSP diagnostics are not authoritative in this workspace because the Groovy server does not have the Gradle classpath and there is no AsciiDoc LSP configured.
- `./gradlew --no-daemon --no-parallel :grails-data-hibernate7-core:test --tests "org.grails.orm.hibernate.HibernateGormStaticApiFindWhereSpec" --tests "org.grails.orm.hibernate.HibernateGormStaticApiSpec" --tests "org.grails.orm.hibernate.query.HqlQueryMethodsSpec" --tests "org.grails.orm.hibernate.query.SelectHqlQuerySpec"` passed after cleaning `:grails-core`: 130 tests, 130 successes, 0 failures.
- `./gradlew --no-daemon --no-parallel :grails-data-hibernate7-docs:asciidoctor :grails-doc:publishGuide -x aggregateGroovydoc` passed and built the user manual.
## Known follow-up work not included here
| Project | Current state | Follow-up needed |
|---|---|---|
| `grails-test-examples-datasources` | Partial H7 coverage exists in `grails-test-examples/hibernate7/grails-multiple-datasources`, but not all datasource-switching and OSIV coverage has an H7 duplicate. | Add explicit H7 duplicate specs before enabling the general project under H7 substitution. |
| `grails-test-examples-views-functional-tests` | Boots with H7 substitution but has functional failures around association rendering. | Fix the rendering behavior or add H7-specific coverage before removing it from `h7IncompatibleProjects`. |
| `grails-test-examples-scaffolding-fields` | Boots with H7 substitution but has Geb failures around association rendering and unique-constraint behavior. | Fix those H7 behavior gaps before enabling the general project under H7 substitution. |
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4732118617
## H7 JSON-view proxy/duplicate-entity id rendering fixed; views app landed
Fixed the remaining grails-views-gson rendering bug and landed the Hibernate 7 views functional app. New commits: `cc6acc3804`, `33a3a1f349`.
### Fixed: proxy / duplicate-entity id rendering (`cc6acc3804`)
The two `TeamSpec` cases that were still failing (deep association + composite id) had two root causes, both now fixed:
- `DefaultJsonViewHelper.findEntity` used `object.getClass()`, which for a Hibernate proxy is the generated subclass (`Player$HibernateProxy$xxx`) and is **not** a registered persistent entity. `findEntity` returned null and the proxy was rendered as a plain POGO (via `processSimple`, dropping its id) instead of as a domain entity. Now it unwraps the proxy before resolving the entity class.
- `DefaultGrailsJsonViewHelper.preProcessedOutput` returned a cached `JsonWritable` bound to the first occurrence's delegate/path/deep state, so a repeated instance (e.g. the same player as both a team's captain and a member of its players collection) rendered the wrong context and dropped the id. Now each occurrence renders fresh; true cyclic associations are still broken earlier by the circular-association handling in `process()`.
Verified: full grails-views-gson unit suite **175/175**, and Hibernate 5 behaviour unchanged.
### Landed: Hibernate 7 views-functional-tests app (`33a3a1f349`)
Added `grails-test-examples/hibernate7/views-functional-tests`, a near-identical clone of the H5 app (only `build.gradle` differs). **All 52 integration specs pass on Hibernate 7**, matching H5 - association/proxy/inheritance/embedded/circular rendering, deep rendering, HAL, and composite ids.
### Scaffolding status
Cloning `scaffolding-fields` to H7 boots and passes **123/136** Geb specs (CRUD, field types, pagination, custom templates). The remaining 13 (10 relationship rendering, 2 validation, 1 CRUD) are a **separate** scaffolding/fields-vs-H7 issue: bootstrap-seeded association data does not appear in scaffolded belongsTo/hasMany/many-to-many forms under H7. This is unrelated to the JSON-view rendering path fixed here and is tracked as the remaining follow-up (the clone is not landed until it is resolved). The breaking-change/coverage tables above are updated accordingly.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3398876254
##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy:
##########
@@ -353,22 +354,42 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doSingleInternal(hql, coercedMap, [], args, false)
+ doSingleInternal(hql, buildWhereParams(coercedMap), [], buildFindWhereArgs(args), false)
}
@Override
List<D> findAllWhere(Map queryMap, Map args) {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doListInternal(hql, coercedMap, [], args, false)
+ doListInternal(hql, buildWhereParams(coercedMap), [], args, false)
}
private String buildWhereHql(Map queryMap) {
- String whereClause = queryMap.keySet().collect { Object key -> "$key = :$key" }.join(' and ')
+ String whereClause = queryMap.collect { Object key, Object value ->
+ String propertyName = validateWherePropertyName(key.toString())
+ value == null ? "$propertyName is null" : "$propertyName = :$propertyName"
+ }.join(' and ')
return "from ${persistentEntity.name} where $whereClause"
}
+ private String validateWherePropertyName(String propertyName) {
+ if (persistentEntity.getPropertyByName(propertyName) == null) {
+ throw new IllegalArgumentException("Property [$propertyName] is not a valid property of ${persistentEntity.name}")
+ }
+ return propertyName
+ }
Review Comment:
Addressed in `00b1e05ce4`: `validateWherePropertyName` now rejects mapped target/column aliases by requiring the resolved persistent property name to exactly match the requested key. Added `HibernateGormStaticApiMappedPropertyEntity.findWhere(name_col: ...)` coverage to lock the behavior.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4708727576
> > > @jdaugherty please explain why? We were missing a ton of issues and breaking changes due to the missing tests on h7? This is working and tests are not production code for end apps. This is DRY
> > > I think we should run the same tests against both.
> >
> >
> > I previously have explained this on multiple PRs. The issue is it complicates the setup, running locally, and troubleshooting dependency resolution. Any missing coverage we should add tests for, you have already identified the gaps so it should be easy.
>
> I think we have to switch hibernate modules for functional tests. I don't think it is scalable to duplicate all test apps. It will create a lot of duplication and a heavy maintenance burden. Can we create shell scripts or other solution to easily run both/all versions locally?
We don't need to duplicate the functional apps themself, but rather the test coverage in the TCK or the example apps to ensure proper coverage. The problem with having switches for functionality is the build tools behave differently based on those switches. This means:
1. Gradle caching is broken when dependencies change (this is huge and made worse by the mono project)
2. Breaks debugging / troubleshooting since switches have to be populated through every tool (from the CLI to intellij)
3. Tools like IntelliJ can't easily pass parameters so they will use what ever is the default. If hibernate5 is the default now, and there's a problem with 7 it's not easy to debug. Once we switch, it will be the opposite.
4. Test coverage reports don't make it clear which version was used. This means anytime we look at code coverage or other tools we can't determine which one was the problem.
We effectively hide behavior behind a switch and Gradle is not designed for that. I'm a strong no for this reason. I believe we can add test coverage, but tests in a functional app for UrlMappings don't need hibernate and shouldn't need to be cloned. We should clone the tests that are relevant or add scenarios for them. We need to do this anyway to prevent regressions.
I realize that substitution is a short cut to getting this, but I view it as a major blocker for regular development & proper project hygiene.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4725472403
## Update: chained transaction manager fix + Hibernate 7 datasources app + base sync
Continued making Hibernate 7.4 a drop-in for Hibernate 5.6 by cloning the flagged general functional apps to H7 and fixing the real production bugs they surfaced. Synced with the latest `8.0.x-hibernate7`. New commits: `3d82ad2c63`, `a9b8a98f52` (+ merge `8e5735500c`).
### Fixed: `ChainedTransactionManager` double-completion under Hibernate 7 (`3d82ad2c63`)
A genuine H7 regression, found by cloning the `datasources` app and running it:
- **Symptom:** with multiple data sources + `chainedTransactionManager.enabled: true`, every `@Rollback` transaction failed under H7 with `IllegalTransactionStateException: Transaction is already completed - do not call commit or rollback more than once`. The byte-identical app passes on H5 (30/30) and failed on H7 (30/30).
- **Root cause (confirmed by instrumenting the transaction lifecycle):** `ChainedTransactionManagerPostProcessor` builds the delegate list from bean *names* (`$primaryTransactionManager` + every `*transactionManager(_.+)?` bean). Under H7 a second bean name aliases the **same** primary transaction-manager instance, so it appears twice. `MultiTransactionStatus` is keyed by instance, so the chained `commit` iterated that instance twice and committed the same `TransactionStatus` twice.
- **Fix:** `ChainedTransactionManager` now dedupes delegate managers by identity (order preserved). A duplicate instance is always meaningless for this class, so it is a no-op when there is no duplicate (e.g. H5). Locked with `ChainedTransactionManagerTests.shouldDeduplicateRepeatedTransactionManagerInstances`.
### Added: Hibernate 7 `datasources` functional app (`a9b8a98f52`)
`grails-test-examples/hibernate7/datasources` is a **near-identical clone** of the H5 `grails-test-examples/datasources` app - the only difference is `build.gradle` (`grails-bom` -> `grails-hibernate7-bom`, `grails-data-hibernate5` -> `grails-data-hibernate7`), so the two are trivially diffable. All four integration specs pass on H7, matching H5:
- `DatasourceSwitchingSpec` 18/18, `CrossDatasourceTransactionSpec` 12/12, `MultipleDataSourcesSpec` 1/1, `OsivGspRenderingSpec` 1/1.
It auto-registers as `grails-test-examples-hibernate7-datasources` and runs in the existing `hibernate7Functional` job.
### Found (documented, tracked): Hibernate 7 lazy hasMany not rendered in JSON views
Cloning `views-functional-tests` to H7 showed **48/52** integration specs already pass under H7 (association/proxy/inheritance/embedded/circular rendering all work). The 4 `TeamSpec` failures share one root cause, confirmed by instrumentation:
- Under H7, `Team.findById(id, [fetch:[players:'join']])` returns the `players` hasMany as an **uninitialized** `org.hibernate.collection.spi.PersistentList`. The JSON view helper by-design skips uninitialized lazy collections in non-deep mode, so `players` is dropped from the JSON (`captain`, a to-one, still renders). H5 renders the collection.
- This is a GORM query-layer difference (`fetch:[assoc:'join']` not eager-initializing the collection under H7), not a view-layer bug. It is a real migration risk (JSON APIs can silently lose hasMany collections) and is tracked in the description for a focused fix. The `views`/`scaffolding` H7 clones are deferred until it is resolved (I did not ship partial/`@PendingFeature` apps).
### Also
- Merged the latest `8.0.x-hibernate7` (typed attribute reads, scaffolding generics, http-client form post) - clean, no conflicts.
- Updated the "Detailed issue coverage", "Known follow-up", and migration-checklist tables above to reflect the fix, the new app, and the views finding.
Net since the parity pass: the multi-datasource chained-transaction regression is fixed, the `datasources` general app now has full verified H7 parity, and the remaining views/scaffolding gap is reduced to one precisely-characterized GORM query bug.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4725842160
## β
All tests passed β
π·οΈ Commit: 8e5735500cbdb085add441428d98d742e8afc6ea
βΆοΈ Tests: 32621 executed
βͺοΈ Checks: 38/38 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4697281261
> @jdaugherty please explain why? We were missing a ton of issues and breaking changes due to the missing tests on h7? This is working and tests are not production code for end apps. This is DRY
>
>
>
> I think we should run the same tests against both.
I previously have explained this on multiple PRs. The issue is it complicates the setup, running locally, and troubleshooting dependency resolution. Any missing coverage we should add tests for, you have already identified the gaps so it should be easy.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3428912901
##########
grails-test-examples/hyphenated/grails-app/conf/application.yml:
##########
@@ -62,9 +62,13 @@ grails:
hibernate:
cache:
queries: false
- use_second_level_cache: true
+ use_second_level_cache: false
Review Comment:
Can we make sure there is a test that still tests the second level cache being configured?
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4730683630
## β
All tests passed β
π·οΈ Commit: fab342ec2dedfde972204436ef84cd5ad33b8fa7
βΆοΈ Tests: 32061 executed
βͺοΈ Checks: 38/38 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4693943766
## β
All tests passed β
π·οΈ Commit: 0b867caa8251bd5cab4943b85cf301e6d5305bcc
βΆοΈ Tests: 34513 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3429949905
##########
grails-core/src/main/groovy/org/grails/transaction/ChainedTransactionManager.java:
##########
@@ -88,7 +89,18 @@ public ChainedTransactionManager(PlatformTransactionManager... transactionManage
this.synchronizationManager = synchronizationManager;
this.transactionManagers = new ArrayList<>();
- this.transactionManagers.addAll(Arrays.asList(transactionManagers));
+ // A single PlatformTransactionManager instance can be exposed under more than one bean
Review Comment:
Done in `6ae130adb5` - condensed the six-line comment to two lines that state the identity-dedup rationale (the same manager can be registered under several bean names, and committing one instance twice throws "Transaction is already completed").
##########
grails-test-examples/hyphenated/grails-app/conf/application.yml:
##########
@@ -62,9 +62,13 @@ grails:
hibernate:
cache:
queries: false
- use_second_level_cache: true
+ use_second_level_cache: false
Review Comment:
Yes - the second-level cache being configured is covered on Hibernate 7 by `SecondLevelCacheSpec` (`grails-data-hibernate7/core/src/test/.../connections/SecondLevelCacheSpec.groovy`). It sets `hibernate.cache.use_second_level_cache: true` with the Hibernate-7-compatible `org.hibernate.cache.jcache.internal.JCacheRegionFactory`, maps a `@Cache` entity, and asserts the 2LC region is registered and exercises the miss-then-hit behaviour (load once = miss, load again = hit, served from the cache).
This `hyphenated` app sets `use_second_level_cache: false` only because the value it previously used, `org.hibernate.cache.ehcache.EhCacheRegionFactory`, is the Hibernate-5 EhCache 2 region factory and does not exist on Hibernate 7. The 2LC configuration behaviour itself is not lost - it remains covered by `SecondLevelCacheSpec`.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "borinquenkid (via GitHub)" <gi...@apache.org>.
borinquenkid commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3408713205
##########
gradle/functional-test-config.gradle:
##########
@@ -32,7 +72,8 @@ configurations.configureEach {
//TODO: This does not handle libraries that are both test fixtures & a libraries like grails-data-mongodb,
// see grails-test-examples-mongodb-base, & grails-test-examples-mongodb-hibernate5 for project() workaround
if (possibleProject.name == 'grails-bom') {
- substitute module(substitutedArtifact) using platform(project(':grails-bom'))
+ def targetBom = redirectBomToH7 ? ':grails-hibernate7-bom' : ':grails-bom'
+ substitute module(substitutedArtifact) using platform(project(targetBom))
Review Comment:
"Hey [@jdaugherty](https://github.com/jdaugherty), that makes total sense. In an OSS context, hidden classpath manipulation like this easily rots if left unchecked, and I agree we don't want people troubleshooting brittle IDE syncs locally.
Here is compromise so we can hit our end-of-June release target for Hibernate 7 parity without abandoning your architectural goal:
Fail-Safe Logging: I will add an explicit, loud deprecation warning or a hardcoded TODO block directly above this substitution in functional-test-config.gradle tracking its removal.
Immediate Post-Release Issue: I'll open a tracking issue right now to completely untangle this layer by cloning the apps into a clean directory structure.
Given that I want to completely drop Hibernate 5 support in the near future anyway, duplicating the entire H5 test matrix right this second might end up being throwaway work. Can we use this substitution as a temporary bridge to unblock the June release gate, with the explicit agreement that the cleanup issue is the immediate next priority?"
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4723635671
Taking a swing at this again, to attempt to address the items listed. Test coverage for h7.4 must match h5.6, except for breaking changes we have agreed to accept (some are unavoidable given hibernate changes) and new additional tests for h7.4.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3398876618
##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy:
##########
@@ -353,22 +354,42 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doSingleInternal(hql, coercedMap, [], args, false)
+ doSingleInternal(hql, buildWhereParams(coercedMap), [], buildFindWhereArgs(args), false)
Review Comment:
Thanks, applied in `00b1e05ce4`. The generated `findWhere`/`findAllWhere` HQL now flows through the shared `prepareHqlQuery` path so `HqlQueryContext.prepare(...)` remains responsible for HQL/query setup while preserving settings, supported JPA hints, query events, and the existing `max: 1` behavior. I also added coverage for mapped-column rejection and `AvailableHints.HINT_READ_ONLY` on `findWhere`.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4686193708
## β
All tests passed β
π·οΈ Commit: fd42df2451be516d2ec81a4e475feeb2598469c1
βΆοΈ Tests: 2317 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "matrei (via GitHub)" <gi...@apache.org>.
matrei commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4705621728
> > @jdaugherty please explain why? We were missing a ton of issues and breaking changes due to the missing tests on h7? This is working and tests are not production code for end apps. This is DRY
> > I think we should run the same tests against both.
>
> I previously have explained this on multiple PRs. The issue is it complicates the setup, running locally, and troubleshooting dependency resolution. Any missing coverage we should add tests for, you have already identified the gaps so it should be easy.
I think we have to switch hibernate modules for functional tests. I don't think it is scalable to duplicate all test apps. It will create a lot of duplication and a heavy maintenance burden. Can we create shell scripts or other solution to easily run both/all versions locally?
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4729724461
I am trying to work through the outstanding h7.4 vs h5.6 items before the call today.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724165663
## Update: rebased on `8.0.x-hibernate7` and pivoted off BOM substitution
I merged the latest `8.0.x-hibernate7`, resolved the conflicts, and reworked the functional-coverage approach based on the review discussion. Pushed as `83e5ebd454` (plus the merge commit `798446f7a1`).
### Addressing the substitution objection
@jdaugherty - you're right, and the arbitrary BOM substitution is gone. No more `redirectBomToH7`, no `grails-bom` -> `grails-hibernate7-bom` redirect, no `grails-data-hibernate5` -> `grails-data-hibernate7` swap, and no `-PhibernateVersion` matrix in the general `functional` job. Default dependency resolution is back to exactly what it was, so `dependencies`/`dependencyInsight` debugging and Gradle build caching are unaffected, and coverage reports attribute cleanly to each module.
@matrei - this also avoids duplicating whole apps and needing shell scripts/switches to run both versions. The shared `grails-datamapping-tck` is already run by **both** `grails-data-hibernate5` and `grails-data-hibernate7` via the `GrailsDataTckManager` ServiceLoader, so a single spec written once executes natively against both Hibernate lines with no flags. That keeps it DRY without hiding behavior behind a switch.
### What changed
**Sync / merge (`798446f7a1`)**
- Merged `origin/8.0.x-hibernate7`.
- Resolved 3 conflicts by adopting the base conventions: `registerDomainClasses()` (replacing `addAllDomainClasses`), kept the base `setupSpec()` in `Hibernate7OptimisticLockingSpec`, kept the PR's `HibernateGormStaticApiMappedPropertyEntity` coverage + `AvailableHints` import in `HibernateGormStaticApiSpec`, and dropped the `@Nonnull` annotation in `CompositeIdWithJoinTableSpec` to match base.
- Fixed merge-induced stale `grails.gorm.specs.*` imports across 7 specs (the base relocated `HibernateGormDatastoreSpec` and the multitenancy support classes to `grails.gorm.tests`), so both core test modules compile again.
**Substitution removal + shared coverage (`83e5ebd454`)**
- `gradle/functional-test-config.gradle`: restored to the base version (all substitution machinery removed).
- `.github/workflows/gradle.yml`: dropped the `hibernate-version` matrix from the general `functional` job; **kept** the publish gate that requires the existing `hibernate7Functional` job (which runs `grails-test-examples/hibernate7/*`), so H7 functional results still block publishing.
- `grails-datamapping-tck`: added shared coverage for the version-agnostic GORM behavior this PR fixed:
- `FindWhereSpec`: `findWhere`/`findAllWhere` null matching (`is null`, not `= null`), and `findWhere` returning a single instance when multiple rows match.
- `GormEnhancerSpec`: `getAll` order preservation, including convertible `String` ids, and a `null` slot for a missing id.
### Verification
- Both core test modules compile after the merge.
- The 6 new TCK specs pass on **both** lanes: `grails-data-hibernate5-core` (full suite, 680 tests, 0 failures) and `grails-data-hibernate7-core` (22 tests, 0 failures). No behavioral divergence for these contracts between H5.6 and H7.4.
- CodeNarc clean on `grails-datamapping-tck`.
- Hibernate ORM stays on `7.4.1.Final` / Hibernate Tools `7.3.8.Final` (unchanged).
### Remaining follow-up (TCK-first)
The H7-only architecture tests (domain-binding, HQL infrastructure) stay module-local since they have no H5 equivalent class. The broader parity sweep continues with the same pattern:
- Port the remaining version-agnostic behavioral specs (e.g. the rest of `HibernateGormStaticApiSpec`'s finder/`getAll` contracts, query-setting coercion) into the TCK so they run on both lines, and add the matching H5 coverage where H5 currently lacks it.
- Add dedicated Hibernate 7 example specs/apps only for behavior that genuinely cannot move to the TCK: multi-datasource/OSIV (`datasources`), and association rendering / unique constraints (`views-functional-tests`, `scaffolding-fields`).
- Any intentional H5.6 -> H7.4 breaking change stays documented in the migration checklist above and gets a test locking the behavior on each side.
The "Detailed issue coverage" and follow-up tables at the top have been updated to match.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4684799206
## π¨ TestLens detected 2 failed tests π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [CI / Functional Tests \(Java 25, Hibernate 7, indy\=false\)](https://github.com/apache/grails-core/actions/runs/27374417771/job/80894842479?pr=15731) | :grails-test-examples-graphql-grails-tenant-app:test | GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver | β |
| [CI / Functional Tests \(Java 25, Hibernate 7, indy\=false\)](https://github.com/apache/grails-core/actions/runs/27374417771/job/80894842479?pr=15731) | :grails-test-examples-graphql-grails-test-app:test | StudentSchemaSpec | β |
π·οΈ Commit: 00b1e05ce49ef9c914d94728d55c7a197559ce55
βΆοΈ Tests: 15030 executed
π‘ Checks: 10/35 completed
### Test Failures
<details>
<summary><strong>GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver</strong> (:grails-test-examples-graphql-grails-tenant-app:test in <a href="https://github.com/apache/grails-core/actions/runs/27374417771/job/80894842479?pr=15731">CI / Functional Tests (Java 25, Hibernate 7, indy=false)</a>)</summary>
```
java.lang.IllegalAccessError: class org.grails.orm.hibernate.proxy.GrailsBytecodeProvider tried to access method 'void org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.<init>()' (org.grails.orm.hibernate.proxy.GrailsBytecodeProvider and org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState are in unnamed module of loader 'app')
at org.grails.orm.hibernate.proxy.GrailsBytecodeProvider.createProxyHelper(GrailsBytecodeProvider.java:48)
at org.grails.orm.hibernate.proxy.GrailsBytecodeProvider.<init>(GrailsBytecodeProvider.java:44)
at org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.<init>(HibernateConnectionSourceFactory.java:99)
at org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:400)
at grails.tenant.app.GraphqlMultiTenantSpec.test GraphQl with multi tenancy mode schema and session tenant resolver(GraphqlMultiTenantSpec.groovy:43)
```
</details>
<details>
<summary><strong>StudentSchemaSpec</strong> (:grails-test-examples-graphql-grails-test-app:test in <a href="https://github.com/apache/grails-core/actions/runs/27374417771/job/80894842479?pr=15731">CI / Functional Tests (Java 25, Hibernate 7, indy=false)</a>)</summary>
```
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDatastore': Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:321)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:309)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1380)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:565)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1192)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:565)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1225)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1121)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:994)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621)
at grails.orm.bootstrap.HibernateDatastoreSpringInitializer.configure(HibernateDatastoreSpringInitializer.groovy:125)
at grails.test.hibernate.HibernateSpec.setupSpec(HibernateSpec.groovy:141)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:220)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:129)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:318)
... 25 more
Caused by: java.lang.AbstractMethodError: Receiver class org.grails.orm.hibernate.EventListenerIntegrator does not define or inherit an implementation of the resolved method 'abstract void integrate(org.hibernate.boot.Metadata, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.service.spi.SessionFactoryServiceRegistry)' of interface org.hibernate.integrator.spi.Integrator.
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:300)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:471)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:728)
at org.grails.orm.hibernate.cfg.HibernateMappingContextConfiguration.buildSessionFactory(HibernateMappingContextConfiguration.java:370)
at org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.create(HibernateConnectionSourceFactory.java:166)
at org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.create(HibernateConnectionSourceFactory.java:280)
at org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.create(HibernateConnectionSourceFactory.java:68)
at org.grails.datastore.mapping.core.connections.AbstractConnectionSourceFactory.create(AbstractConnectionSourceFactory.java:83)
at org.grails.datastore.mapping.core.connections.AbstractConnectionSourceFactory.create(AbstractConnectionSourceFactory.java:71)
at org.grails.datastore.mapping.core.connections.ConnectionSourcesInitializer.create(ConnectionSourcesInitializer.groovy:45)
at org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:354)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:207)
... 27 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver <!-- uniqueId=[engine:spock]/[spec:grails.tenant.app.GraphqlMultiTenantSpec]/[feature:$spock_feature_0_0] -->
π² StudentSchemaSpec <!-- uniqueId=[engine:spock]/[spec:grails.test.app.manyToMany.StudentSchemaSpec] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4695509526
## β
All tests passed β
π·οΈ Commit: 7c991ad67fe3ff26cc1d955694d36465016a1dbf
βΆοΈ Tests: 34449 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4730173459
## CI fixes + Hibernate 7 eager fetch-join fix
Fixed the failing CI and the underlying H7 query bug it pointed at. New commits: `81b0c52996`, `fab342ec2d`.
### CI failures fixed
- **`Core Projects` (checkstyle):** removed an unused `java.util.Arrays` import left over from the ChainedTransactionManager dedupe fix.
- **`MongoDB Functional Tests` + `Coverage - grails-core` (`grails-data-mongodb-core:test`):** the shared TCK test `getAll preserves order for convertible String ids` is Hibernate-specific (MongoDB ObjectId ids are not derived from arbitrary numeric strings), so it failed on Mongo. Moved it out of the datastore-agnostic TCK into `HibernateGetAllConvertibleIdSpec` in both Hibernate modules (H5<->H7 parity preserved; no longer run on Mongo). The version-agnostic getAll tests stay in the TCK.
### Fixed: Hibernate 7 eager fetch joins (`fab342ec2d`)
A real H7 regression, surfaced while cloning the views app: `Entity.findById(id, [fetch:[assoc:'join']])` (and dynamic finders) did not eagerly initialize the association on H7, while H5 did - so JSON views silently dropped hasMany collections.
Root cause: GORM's `DynamicFinder` turns an EAGER fetch into `query.join(property)`; the rewritten H7 query layer materialized that as a plain JPA `root.join` only when referenced in a predicate (a fetch-only association never is), so it was never fetched. JPA needs `root.fetch(...)`.
Fix (H7 only): `HibernateQuery` records fetch-join paths; `JpaCriteriaQueryCreator` materializes them as `root.fetch(path, joinType)` for full-entity selects (count/projection queries skipped). Locked with `FetchJoinSpec` in both modules. The **full `grails-data-hibernate7-core` suite is green (2944 tests, 0 failures)**, so criteria/finder/projection/count/pagination are not regressed; H5 is untouched.
### Views functional app: 48/52 -> 50/52 on H7
With the fetch-join fix, cloning `views-functional-tests` to H7 now passes 50/52 (association + HAL rendering fixed). The remaining 2 (`TeamSpec` deep association + composite ID) hit a **separate, narrower** grails-views-gson bug: an entity loaded via a Hibernate proxy (`Player.load(id)`), or appearing twice in the graph, renders without its `id` under H7 (and a duplicate is de-duplicated to an empty object). H5 renders the ids. That is documented in the tables above as the remaining blocker for landing the `views`/`scaffolding` H7 clones - it is a view-layer (`grails-views-gson`) id-extraction + de-dup issue, not the GORM query bug that is now fixed.
CI is re-running on these fixes.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4733303813
## π¨ TestLens detected 1 failed test π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
#### [CI / Functional Tests \(Java 21, indy\=true\)](https://github.com/apache/grails-core/actions/runs/27704458023/job/81949253722?pr=15731) > :grails-test-examples-scaffolding:integrationTest
| Test | Runs | Flakiness |
|---|---|---|
| UserControllerSpec > User list | β |
π·οΈ Commit: 6ae130adb5413ca38b183e8fd9bee6521dc269ae
βΆοΈ Tests: 11274 executed
π‘ Checks: 23/34 completed
### Test Failures
<details>
<summary><strong>UserControllerSpec > User list</strong> (:grails-test-examples-scaffolding:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/27704458023/job/81949253722?pr=15731">CI / Functional Tests (Java 21, indy=true)</a>)</summary>
```
geb.waiting.WaitTimeoutException: condition did not pass in 10 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:128)
at geb.waiting.PotentiallyWaitingExecutor.execute(PotentiallyWaitingExecutor.groovy:31)
at geb.Page.verifyThisPageAtOnly(Page.groovy:424)
at geb.Page.getAtVerificationResult(Page.groovy:217)
at geb.Page.verifyAt(Page.groovy:188)
at geb.Browser.doAt(Browser.groovy:1208)
at geb.Browser.at(Browser.groovy:410)
at geb.Browser.to(Browser.groovy:566)
at geb.Browser.to(Browser.groovy:543)
at geb.Browser.to(Browser.groovy:532)
at grails.plugin.geb.support.delegate.BrowserDelegate$Trait$Helper.to(BrowserDelegate.groovy:160)
at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:46)
Caused by: Assertion failed:
title == pageTitle
| | |
| | 'User List'
| false
'Please sign in'
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy:28)
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:117)
... 11 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² UserControllerSpec > User list <!-- uniqueId=[engine:spock]/[spec:com.example.UserControllerSpec]/[feature:$spock_feature_1_0] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4731623703
## β
All tests passed β
π·οΈ Commit: 9dd35fc01386d0178bafd5ddbf1f2592846d3a8e
βΆοΈ Tests: 30940 executed
βͺοΈ Checks: 38/38 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #15731:
URL: https://github.com/apache/grails-core/pull/15731
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4732842352
## β
All tests passed β
π·οΈ Commit: 33a3a1f34989bd6be242d610e7de31e9deaada8c
βΆοΈ Tests: 23194 executed
βͺοΈ Checks: 38/38 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4692137378
@jdaugherty please explain why? We were missing a ton of issues and breaking changes due to the missing tests on h7? This is working and tests are not production code for end apps. This is DRY
I think we should run the same tests against both.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "borinquenkid (via GitHub)" <gi...@apache.org>.
borinquenkid commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3398468868
##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy:
##########
@@ -353,22 +354,42 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doSingleInternal(hql, coercedMap, [], args, false)
+ doSingleInternal(hql, buildWhereParams(coercedMap), [], buildFindWhereArgs(args), false)
Review Comment:
Try to leverage HqlQueryContext, it is the HQL Query generator
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3398332363
##########
grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy:
##########
@@ -353,22 +354,42 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doSingleInternal(hql, coercedMap, [], args, false)
+ doSingleInternal(hql, buildWhereParams(coercedMap), [], buildFindWhereArgs(args), false)
}
@Override
List<D> findAllWhere(Map queryMap, Map args) {
if (!queryMap) return null
Map coercedMap = queryMap.collectEntries { k, v -> [k.toString(), v] }
String hql = buildWhereHql(coercedMap)
- doListInternal(hql, coercedMap, [], args, false)
+ doListInternal(hql, buildWhereParams(coercedMap), [], args, false)
}
private String buildWhereHql(Map queryMap) {
- String whereClause = queryMap.keySet().collect { Object key -> "$key = :$key" }.join(' and ')
+ String whereClause = queryMap.collect { Object key, Object value ->
+ String propertyName = validateWherePropertyName(key.toString())
+ value == null ? "$propertyName is null" : "$propertyName = :$propertyName"
+ }.join(' and ')
return "from ${persistentEntity.name} where $whereClause"
}
+ private String validateWherePropertyName(String propertyName) {
+ if (persistentEntity.getPropertyByName(propertyName) == null) {
+ throw new IllegalArgumentException("Property [$propertyName] is not a valid property of ${persistentEntity.name}")
+ }
+ return propertyName
+ }
Review Comment:
`validateWherePropertyName` uses `persistentEntity.getPropertyByName(...)`, which can resolve mapped `targetName` values (for example custom column names) via `AbstractPersistentEntity`βs `mappedPropertiesByName`. That means non-property keys may be treated as βvalidβ and then interpolated into HQL, contradicting the intent to only allow domain property names and potentially producing invalid HQL at runtime.
##########
grails-test-examples/hyphenated/grails-app/conf/application.yml:
##########
@@ -62,9 +62,14 @@ grails:
hibernate:
cache:
queries: false
- use_second_level_cache: true
+ use_second_level_cache: false
use_query_cache: false
region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
Review Comment:
`region.factory_class` still points at `org.hibernate.cache.ehcache.EhCacheRegionFactory` even though both second-level and query caching are disabled. This is misleading and can become a hard failure in the Hibernate 7 functional lane where `hibernate-ehcache` is excluded (leaving the class unavailable).
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4687494743
## π¨ TestLens detected 1 failed test π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [CI / Functional Tests \(Java 21, Hibernate 5, indy\=true\)](https://github.com/apache/grails-core/actions/runs/27393404068/job/80955644575?pr=15731) | :grails-test-examples-scaffolding:integrationTest | UserControllerSpec > User list | β |
π·οΈ Commit: a1126fce6fcb8715c0d3658ce33cfbe17ca236c5
βΆοΈ Tests: 29009 executed
π‘ Checks: 27/36 completed
### Test Failures
<details>
<summary><strong>UserControllerSpec > User list</strong> (:grails-test-examples-scaffolding:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/27393404068/job/80955644575?pr=15731">CI / Functional Tests (Java 21, Hibernate 5, indy=true)</a>)</summary>
```
geb.waiting.WaitTimeoutException: condition did not pass in 10 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:128)
at geb.waiting.PotentiallyWaitingExecutor.execute(PotentiallyWaitingExecutor.groovy:31)
at geb.Page.verifyThisPageAtOnly(Page.groovy:424)
at geb.Page.getAtVerificationResult(Page.groovy:217)
at geb.Page.verifyAt(Page.groovy:188)
at geb.Browser.doAt(Browser.groovy:1208)
at geb.Browser.at(Browser.groovy:410)
at geb.Browser.to(Browser.groovy:566)
at geb.Browser.to(Browser.groovy:543)
at geb.Browser.to(Browser.groovy:532)
at grails.plugin.geb.support.delegate.BrowserDelegate$Trait$Helper.to(BrowserDelegate.groovy:160)
at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:46)
Caused by: Assertion failed:
title == pageTitle
| | |
| | 'User List'
| false
'Please sign in'
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy:28)
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:117)
... 11 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² UserControllerSpec > User list <!-- uniqueId=[engine:spock]/[spec:com.example.UserControllerSpec]/[feature:$spock_feature_1_0] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4691945927
## β
All tests passed β
π·οΈ Commit: b5af3b84eb4bc5e399c384debdcea272cd3b9086
βΆοΈ Tests: 35074 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4693382120
Updated the Hibernate 7 path to Hibernate ORM 7.4 because Spring Boot 4.1 has moved its managed Hibernate version there. Hibernate 7.3 is already in limited-support mode, so staying there would leave Grails targeting a line that is not expected to receive the ongoing updates we need. Hibernate 7.4 is the actively maintained 7.x line, so aligning with Boot 4.1 and 7.4 keeps the Hibernate 7 integration on the version that will continue to get fixes.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4691460631
I am highly against arbitrary substitution of hibernate modules. We should be cloning apps to enhance the coverage. Otherwise we will be dealing with unexpected dependency resolutions
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4733002704
## Fixed: non-transactional BootStrap saves silently discarded on Hibernate 7
Investigated the scaffolding-fields-on-H7 failures and found a real Hibernate 7 framework regression. New commits: `7a6cc6375f` (fix + test), `6ae130adb5` (review-comment: simplified the `ChainedTransactionManager` dedupe comment).
### Root cause (runtime-traced)
A `@Integration` clone of `scaffolding-fields` showed bootstrap-seeded data missing from scaffolded relationship forms. Instrumenting `BootStrap` proved that GORM `.save()` calls in a **non-transactional** `init` closure did not persist on H7 (`Department.count() == 0` immediately after seeding), while a `withTransaction {}` probe committed them.
`GrailsConfigUtils.executeGrailsBootstraps` binds a session via the `PersistenceContextInterceptor` (`init()`), runs the BootStrap closures, then calls `interceptor.flush()` / `destroy()`. On H7, `HibernatePersistenceContextInterceptor.flush()` was a **no-op** for this path: its constructor hardcodes `transactionRequired = true`, and `flush()` only flushed when `TransactionSynchronizationManager.isSynchronizationActive()` - which is `false` during a non-transactional BootStrap. So the interceptor-owned session was never flushed/committed and `destroy()` discarded the pending inserts. (H5 happened to persist them.)
### Fix
`HibernatePersistenceContextInterceptor.flush()` now, when it is not participating in an outer session and there is no active synchronization (it opened the session itself, e.g. for a non-transactional BootStrap), flushes **and commits** the owned session's pending changes in a short transaction. The existing non-transactional and active-synchronization branches (the OSIV web-request path) are unchanged. Locked with a `HibernatePersistenceContextInterceptorSpec` regression test mirroring the BootStrap flow.
### Verification
- `HibernatePersistenceContextInterceptorSpec`: 4/4 (3 existing + the new test).
- H7 `scaffolding-fields` functional app: **123/136 -> 134/136** (all the bootstrap-data relationship failures resolved).
- H7 `views-functional-tests`: still **52/52** (OSIV not regressed).
The 2 residual scaffolding failures are Geb test-stability issues, not H7 regressions: a flaky sort/list interaction (a different pagination spec fails on each run) and a show-page belongsTo display assertion (body captured before content renders). Tables above updated; the second-level-cache question is answered inline (covered by `SecondLevelCacheSpec`).
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724929157
## π¨ TestLens detected 1 failed test π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [CI / Functional Tests \(Java 25, indy\=false\)](https://github.com/apache/grails-core/actions/runs/27657063557/job/81793424903?pr=15731) | :grails-test-examples-scaffolding:integrationTest | UserControllerSpec > User list | β |
π·οΈ Commit: 08ae34fa368637cc9fa320bf96730c27cbb9f464
βΆοΈ Tests: 27171 executed
π‘ Checks: 26/34 completed
### Test Failures
<details>
<summary><strong>UserControllerSpec > User list</strong> (:grails-test-examples-scaffolding:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/27657063557/job/81793424903?pr=15731">CI / Functional Tests (Java 25, indy=false)</a>)</summary>
```
geb.waiting.WaitTimeoutException: condition did not pass in 30 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:128)
at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:55)
at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:45)
at geb.Page.waitFor(Page.groovy:120)
at com.example.pages.LoginPage.login(LoginPage.groovy:39)
at com.example.UserControllerSpec.setup(UserControllerSpec.groovy:33)
Caused by: Assertion failed:
title != pageTitle
| | |
| | 'Please sign in'
| false
'Please sign in'
at com.example.pages.LoginPage.login_closure1(LoginPage.groovy:39)
at com.example.pages.LoginPage.login_closure1(LoginPage.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:117)
... 5 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² UserControllerSpec > User list <!-- uniqueId=[engine:spock]/[spec:com.example.UserControllerSpec]/[feature:$spock_feature_1_0] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724187644
I'll have one more commit that bring testing as close to parity as possible, between h5.6 and h7.4.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4696734447
## β
All tests passed β
π·οΈ Commit: 3ee18b8763490fd2bd2c672e1538f41d3f63c303
βΆοΈ Tests: 33818 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3398876442
##########
grails-test-examples/hyphenated/grails-app/conf/application.yml:
##########
@@ -62,9 +62,14 @@ grails:
hibernate:
cache:
queries: false
- use_second_level_cache: true
+ use_second_level_cache: false
use_query_cache: false
region.factory_class: 'org.hibernate.cache.ehcache.EhCacheRegionFactory'
Review Comment:
Addressed in `00b1e05ce4`: removed the stale `org.hibernate.cache.ehcache.EhCacheRegionFactory` setting from the hyphenated sample config since second-level and query caching are disabled and the Hibernate 7 lane does not carry that provider.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3414024661
##########
gradle/functional-test-config.gradle:
##########
@@ -32,7 +72,8 @@ configurations.configureEach {
//TODO: This does not handle libraries that are both test fixtures & a libraries like grails-data-mongodb,
// see grails-test-examples-mongodb-base, & grails-test-examples-mongodb-hibernate5 for project() workaround
if (possibleProject.name == 'grails-bom') {
- substitute module(substitutedArtifact) using platform(project(':grails-bom'))
+ def targetBom = redirectBomToH7 ? ':grails-hibernate7-bom' : ':grails-bom'
+ substitute module(substitutedArtifact) using platform(project(targetBom))
Review Comment:
I'm strongly a -1 on this. People will just ignore the depreciation and it doesn't solve our actual problem. The majority of the work I've done with Grails is dependency debugging - probably over 50% of my time has been spent on it. This completely breaks that workflow. By substituting arbitrarily, we now have to populate that option throughout our workflows to be able to debug.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4721634378
Since no one else is offering to expand the test coverage, I'll try to make a pass at this in the next few days.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3424396571
##########
gradle/functional-test-config.gradle:
##########
@@ -32,7 +72,8 @@ configurations.configureEach {
//TODO: This does not handle libraries that are both test fixtures & a libraries like grails-data-mongodb,
// see grails-test-examples-mongodb-base, & grails-test-examples-mongodb-hibernate5 for project() workaround
if (possibleProject.name == 'grails-bom') {
- substitute module(substitutedArtifact) using platform(project(':grails-bom'))
+ def targetBom = redirectBomToH7 ? ':grails-hibernate7-bom' : ':grails-bom'
+ substitute module(substitutedArtifact) using platform(project(targetBom))
Review Comment:
Agreed, and done. Removed the BOM substitution entirely in 83e5ebd454.
`gradle/functional-test-config.gradle` is back to the base-branch version: no `redirectBomToH7`, no `grails-bom` -> `grails-hibernate7-bom` redirect, no `grails-data-hibernate5` -> `grails-data-hibernate7` swap, and no `hibernate-ehcache`/`jboss-transaction` excludes or H7 BOM platform attachment. The `hibernate-version` matrix is also gone from the general `functional` workflow job, so there's no hidden classpath manipulation and `dependencies`/`dependencyInsight` debugging behaves normally again. The default lane is just Hibernate 5 as before; the existing `hibernate7Functional` job still runs the H7-specific example apps and now gates `publish`.
To keep the H7 coverage we were missing without a switch, the version-agnostic GORM behavior now lives in the shared TCK (`grails-datamapping-tck`), which both `grails-data-hibernate5` and `grails-data-hibernate7` already run via the `GrailsDataTckManager` ServiceLoader. The same specs therefore execute natively on both lines, Gradle caching stays intact, and coverage reports clearly attribute to each module.
First batch landed in `FindWhereSpec` and `GormEnhancerSpec` (findWhere/findAllWhere null matching, findWhere single-result limiting, and getAll order preservation including convertible String ids). All six new tests pass on both Hibernate 5.6 and 7.4. Remaining relevant coverage will follow the same TCK-first pattern, with dedicated H7 example specs only where behavior genuinely cannot move to the TCK.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724656745
## π¨ TestLens detected 1 failed test π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [CI / Functional Tests \(Java 21, indy\=true\)](https://github.com/apache/grails-core/actions/runs/27654600042/job/81786099594?pr=15731) | :grails-test-examples-scaffolding:integrationTest | UserControllerSpec > User list | β |
π·οΈ Commit: ec562deee4672a85fa054120aa72e0e6943b5285
βΆοΈ Tests: 25418 executed
π‘ Checks: 28/34 completed
### Test Failures
<details>
<summary><strong>UserControllerSpec > User list</strong> (:grails-test-examples-scaffolding:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/27654600042/job/81786099594?pr=15731">CI / Functional Tests (Java 21, indy=true)</a>)</summary>
```
geb.waiting.WaitTimeoutException: condition did not pass in 10 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:128)
at geb.waiting.PotentiallyWaitingExecutor.execute(PotentiallyWaitingExecutor.groovy:31)
at geb.Page.verifyThisPageAtOnly(Page.groovy:424)
at geb.Page.getAtVerificationResult(Page.groovy:217)
at geb.Page.verifyAt(Page.groovy:188)
at geb.Browser.doAt(Browser.groovy:1208)
at geb.Browser.at(Browser.groovy:410)
at geb.Browser.to(Browser.groovy:566)
at geb.Browser.to(Browser.groovy:543)
at geb.Browser.to(Browser.groovy:532)
at grails.plugin.geb.support.delegate.BrowserDelegate$Trait$Helper.to(BrowserDelegate.groovy:160)
at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:46)
Caused by: Assertion failed:
title == pageTitle
| | |
| | 'User List'
| false
'Please sign in'
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy:28)
at com.example.pages.UserListPage._clinit__closure1(UserListPage.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:117)
... 11 more
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² UserControllerSpec > User list <!-- uniqueId=[engine:spock]/[spec:com.example.UserControllerSpec]/[feature:$spock_feature_1_0] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724801575
## Module + TCK parity: tracked follow-ups completed
Continued the parity pass; the module/TCK follow-ups from the previous comment are now done and verified. Pushed as `ec562deee4` and `08ae34fa36`.
**H7 -> H5 (shared behavior added to H5, verified passing on H5):**
`HibernateGormEnhancerSpec`, `HibernateDatastoreMultiTenancySpec`, `HibernateEventListenersSpec`, `HibernateConnectionSourceSettingsBuilderSpec`, `GrailsQueryExceptionSpec`, `HibernateDatastoreConnectionSourcesRegistrarSpec`, `SoftKeySpec`, `AddToManagedEntitySpec`, `GormEnhancerCleanupSpec`, `PersistentPropertySpec`, `NullValueEqualSpec`.
**H5 -> H7 (reverse gap closed):**
`grails/gorm/tests/proxy/ByteBuddyProxySpec` added to H7 (default ByteBuddy proxy getId/id/truthy/association checks do not initialize the proxy).
**Documented H5 vs H7 behavioral differences (each side asserts its own real result, verified):**
| Behavior | Hibernate 5.6 | Hibernate 7.4 |
|---|---|---|
| `PersistentProperty.isLazyAble()` on a unidirectional one-to-many | `false` | `true` |
| `isDirty()` on a clean loaded proxy | initializes the proxy | does **not** initialize the proxy |
| `countByAgeNotEqual(11)` with null-aged rows present | `0` (SQL three-valued logic excludes nulls) | `2` (null-valued rows included) |
**Verified H7-only (not gaps):** the remaining H7 behavioral specs were each copied into H5 and run; they fail on H5 because they depend on Hibernate-7-specific API/behavior (`HibernateCriteriaBuilder`/`InstanceApiHelper`/`EventListenerIntegrator` signatures, H7 event SPI/metamodel types, `ChildHibernateDatastore`/`CloseSuppressingInvocationHandler`/`HibernatePagedResultList`/`SelectHqlQuery`/`HibernateDetachedCriteria`), so they correctly stay H7-only. The ~140 `cfg/domainbinding/**` + `query/**` specs cover the H7 internal rewrite that has no H5 code to mirror.
**State:** full `grails-data-hibernate5-core` suite green (722 tests, 0 failures, 33 skipped) with all additions; new H7 specs verified on H7. Every version-agnostic GORM contract now runs on both lines (shared TCK + the per-module specs), and there are no remaining true H5-only or H7-only behavioral gaps - only legitimate Hibernate-implementation asymmetry.
**Remaining (separate functional pass):** dedicated Hibernate 7 functional apps under `grails-test-examples` for the GORM-bearing general apps (`datasources` OSIV/multi-datasource, `views-functional-tests` and `scaffolding-fields` association rendering / unique constraints), replacing the removed runtime substitution. This is app-creation + Geb work rather than spec porting.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3429014145
##########
H7_GORM_BUG_REPORT.md:
##########
@@ -0,0 +1,99 @@
+<!--
+SPDX-License-Identifier: Apache-2.0
Review Comment:
Let's address this in the step 2 PR, after this one merges
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4724423511
## Bidirectional H5.6 <-> H7.4 test-parity pass
Following up on the coverage discussion, I did a full, TCK-aware parity audit across the three test layers and added what is genuinely shared. Pushed as `ec562deee4`.
### The three layers (where coverage belongs)
| Layer | Module | Runs on | Use for |
|---|---|---|---|
| Shared TCK | `grails-datamapping-tck` | H5 **and** H7 (and Mongo) via the `GrailsDataTckManager` ServiceLoader | Version-agnostic GORM contracts |
| Per-module | `grails-data-hibernate5/7/core/src/test` | one Hibernate line | Hibernate-implementation behavior (cannot live in the datastore-agnostic TCK) |
| Functional | `grails-test-examples` | app boot | End-to-end app behavior |
### What is already at parity (no action needed)
The shared TCK already runs **~60 GORM behavioral specs on both H5.6 and H7.4** (CRUD, dynamic finders, `findWhere`, criteria, detached criteria, projections, paged results, optimistic locking, proxies, validation, events, multi-datasource, multi-tenancy, etc.). The raw file-count gap (H5 ~109 vs H7 ~315 specs) is **not** a coverage gap: ~140 of the H7-only specs cover the Hibernate-7 internal rewrite (`cfg/domainbinding/**`, `query/**` HQL infrastructure, `support/hibernate7/**`) - code that does not exist in H5, so there is nothing to mirror.
### What I added this pass
- **TCK (both sides):** extended `FindWhereSpec` and `GormEnhancerSpec` with the finder behaviors this PR fixed - `findWhere`/`findAllWhere` null matching (`is null`), `findWhere` single-result limiting, `getAll` order preservation incl. convertible String ids and a null slot for a missing id. Verified passing on both lines.
- **H5 per-module (parity with H7):** ported 7 H7 specs whose classes exist identically in H5 - `HibernateGormEnhancerSpec`, `HibernateDatastoreMultiTenancySpec`, `HibernateEventListenersSpec`, `HibernateConnectionSourceSettingsBuilderSpec`, `GrailsQueryExceptionSpec`, `HibernateDatastoreConnectionSourcesRegistrarSpec`, `SoftKeySpec`. All pass on H5 (32 tests, 0 failures) and still pass on H7.
### Verified H7-only (correctly asymmetric - not gaps)
I copied every remaining shared-looking H7 behavioral spec into H5 and **ran them**; these failed because they genuinely test Hibernate-7-specific API/behavior, so they stay H7-only (documented as the new behavior where it is a breaking change):
| Spec | Why it is H7-only |
|---|---|
| `HibernateCriteriaBuilderSpec` / `...DirectSpec` | H7 adds a `HibernateCriteriaBuilder(Class, SessionFactory, HibernateDatastore)` ctor + criteria behaviors (isEmpty/scroll/fetchMode/singleResult) that differ on H5; criteria behavior itself is already covered both-sides by the TCK `CriteriaBuilderSpec` |
| `InstanceApiHelperSpec` | H7 `InstanceApiHelper.remove(Object, boolean)` signature differs from H5 |
| `EventListenerIntegratorSpec` | Hibernate 7 event SPI (`integrate(Metadata, BootstrapContext, SessionFactoryImplementor)`) differs from H5 |
| `HibernateGormValidationApiSpec` | H7 shares the datastore `GrailsHibernateTemplate`; H5 does not (intentional H7 behavior) |
| `TraitPropertyAccessStrategySpec`, `GrailsEntityDirtinessStrategySpec`, `MultiTenantEventListenerSpec`, `HibernateRuntimeUtilsSpec`, `HibernateDatastoreSchemaMultiTenancySpec` | Depend on Hibernate-7 SPI / metamodel types (`EntityMappingType`, etc.) or H7-only classes (`ChildHibernateDatastore`, `CloseSuppressingInvocationHandler`, `HibernatePagedResultList`, `SelectHqlQuery`, `HibernateDetachedCriteria`) absent from H5 |
### Tracked follow-up (next pass)
- Promote to the TCK (both sides) where fully generic: `GormEnhancerCleanupSpec`, `PersistentPropertySpec`, the `GroovyProxyFactory` proxy spec.
- Reverse gap: H5 `ByteBuddyProxySpec` (default ByteBuddy proxy: getId/`isInitialized` without initialization) has no H7 equivalent - add an H7 version using the H7 `HibernateProxyHandler`.
- De-dupe: H7 has a local `NullValueEqualSpec` that duplicates the TCK one.
- Functional layer: dedicated H7 apps for `datasources` (OSIV/multi-datasource), `views-functional-tests` and `scaffolding-fields` (association rendering, unique constraints), rather than the removed runtime substitution.
Net: every version-agnostic GORM behavior is exercised on both Hibernate lines (TCK + the new H5 specs), and every remaining asymmetry is a Hibernate-implementation difference that was verified by actually running the tests on both sides - not an untested gap.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3428897627
##########
grails-core/src/main/groovy/org/grails/transaction/ChainedTransactionManager.java:
##########
@@ -88,7 +89,18 @@ public ChainedTransactionManager(PlatformTransactionManager... transactionManage
this.synchronizationManager = synchronizationManager;
this.transactionManagers = new ArrayList<>();
- this.transactionManagers.addAll(Arrays.asList(transactionManagers));
+ // A single PlatformTransactionManager instance can be exposed under more than one bean
Review Comment:
Let's simplify this comment?
##########
H7_GORM_BUG_REPORT.md:
##########
@@ -0,0 +1,99 @@
+<!--
+SPDX-License-Identifier: Apache-2.0
Review Comment:
Why is this checked in?
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4684017547
## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/15731?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 19.0184%. Comparing base ([`95e7400`](https://app.codecov.io/gh/apache/grails-core/commit/95e74005688b7cd49dfe1c53bdc011075c6587df?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2e02653`](https://app.codecov.io/gh/apache/grails-core/commit/2e0265328b3b44d6c6cb3d0c8d30864a130189fb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/grails-core/pull/15731?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## 8.0.x-hibernate7 #15731 +/- ##
=====================================================
Coverage 19.0184% 19.0184%
Complexity 288 288
=====================================================
Files 57 57
Lines 3423 3423
Branches 597 597
=====================================================
Hits 651 651
Misses 2642 2642
Partials 130 130
```
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4683977443
## π¨ TestLens detected 1 failed test π¨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [CI / Functional Tests \(Java 25, Hibernate 7, indy\=false\)](https://github.com/apache/grails-core/actions/runs/27369431829/job/80877469916?pr=15731) | :grails-test-examples-graphql-grails-tenant-app:test | GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver | β |
π·οΈ Commit: 2e0265328b3b44d6c6cb3d0c8d30864a130189fb
βΆοΈ Tests: 10714 executed
π‘ Checks: 11/36 completed
### Test Failures
<details>
<summary><strong>GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver</strong> (:grails-test-examples-graphql-grails-tenant-app:test in <a href="https://github.com/apache/grails-core/actions/runs/27369431829/job/80877469916?pr=15731">CI / Functional Tests (Java 25, Hibernate 7, indy=false)</a>)</summary>
```
java.lang.IllegalAccessError: class org.grails.orm.hibernate.proxy.GrailsBytecodeProvider tried to access method 'void org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.<init>()' (org.grails.orm.hibernate.proxy.GrailsBytecodeProvider and org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState are in unnamed module of loader 'app')
at org.grails.orm.hibernate.proxy.GrailsBytecodeProvider.createProxyHelper(GrailsBytecodeProvider.java:48)
at org.grails.orm.hibernate.proxy.GrailsBytecodeProvider.<init>(GrailsBytecodeProvider.java:44)
at org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.<init>(HibernateConnectionSourceFactory.java:99)
at org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:400)
at grails.tenant.app.GraphqlMultiTenantSpec.test GraphQl with multi tenancy mode schema and session tenant resolver(GraphqlMultiTenantSpec.groovy:43)
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
π² GraphqlMultiTenantSpec > test GraphQl with multi tenancy mode schema and session tenant resolver <!-- uniqueId=[engine:spock]/[spec:grails.tenant.app.GraphqlMultiTenantSpec]/[feature:$spock_feature_0_0] -->
Reuse successful test results:
π² β»οΈ Only rerun the tests that failed or were muted before
Click the checkbox to trigger a rerun:
π² **Rerun jobs**
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#discussion_r3408198114
##########
gradle/functional-test-config.gradle:
##########
@@ -32,7 +72,8 @@ configurations.configureEach {
//TODO: This does not handle libraries that are both test fixtures & a libraries like grails-data-mongodb,
// see grails-test-examples-mongodb-base, & grails-test-examples-mongodb-hibernate5 for project() workaround
if (possibleProject.name == 'grails-bom') {
- substitute module(substitutedArtifact) using platform(project(':grails-bom'))
+ def targetBom = redirectBomToH7 ? ':grails-hibernate7-bom' : ':grails-bom'
+ substitute module(substitutedArtifact) using platform(project(targetBom))
Review Comment:
@borinquenkid my issue is this file, specifically this substitution.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4694060738
Pushed a docs follow-up commit (5cd01959a) and updated the PR description. The PR body now targets Hibernate ORM 7.4, expands the fixed-issue table for the 7.4 dependency/API, proxy, identifier, generator, and event-listener fixes, and marks resolved rows in the breaking-change checklist. The Hibernate 7 docs now document the remaining end-application migration items after the PR, including Hibernate 7.3/7.4 behavior and DDL changes that are not resolved by Grails API fixes.
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Expand Hibernate 7 functional coverage and query parity [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15731:
URL: https://github.com/apache/grails-core/pull/15731#issuecomment-4694477110
## β
All tests passed β
π·οΈ Commit: a5cd01959a6102a86aeb3f670663024ed71e252e
βΆοΈ Tests: 33741 executed
βͺοΈ Checks: 40/40 completed
---
_Learn more about TestLens at [testlens.app](https://testlens.app)._
--
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: notifications-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org