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/05/21 23:34:01 UTC
[PR] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
jamesfredley opened a new pull request, #15673:
URL: https://github.com/apache/grails-core/pull/15673
## Background
Merge commit [6ebc60c6d0](https://github.com/apache/grails-core/commit/6ebc60c6d06b41505598ddb0c44ed129b98ffa65) ("Merge branch '7.2.x' into 8.0.x") turned the entire CI matrix red. Reproducing the failures locally surfaced five distinct problems that need to be addressed for `8.0.x` to build again on the Grails 8 / Spring Boot 4 / Spring 7 / Hibernate Jakarta stack. This PR fixes each one in its own commit.
## CI failures explained
| CI job (run 26250293774) | Root cause | Fixed by |
|---|---|---|
| `Validate Dependency Versions` | graphql-java pinned to 24.3 in `dependencies.gradle` but Spring Boot 4.0.5 BOM ships 25.0; the SB constraint wins resolution and the validator caught the drift | Commit 2 |
| `Build Grails-Core (ubuntu/macos/windows, JDK 21+25)` | `:grails-test-examples-graphql-spring-boot-app:compileGroovy` cannot resolve `org.springframework.boot.hibernate.autoconfigure.HibernateJpaAutoConfiguration` because SB4 split it into a separate module and the new example's `build.gradle` does not depend on it | Commit 3 |
| `Functional Tests`, `Hibernate5 Functional Tests`, `Mongodb Functional Tests` | All cascade from the same `:grails-test-examples-graphql-spring-boot-app:compileGroovy` failure | Commit 3 |
| `Hibernate5 Functional Tests` (post compile-fix) | `:grails-data-hibernate5-dbmigration:integrationTest` would fail with `LoggerFactory is not a Logback LoggerContext but Logback is on the classpath` because `slf4j-simple` was added back as a test runtime dep and competes with the Logback binding SB4 ships transitively | Commit 4 |
| CodeQL (`./gradlew testClasses`) | Same compile failure as the main build | Commit 3 |
Two more issues were discovered while reproducing the build locally; neither is visible on CI yet because earlier failures stopped the build before reaching them.
| Latent issue | Root cause | Fixed by |
|---|---|---|
| Three string-literal `@EnableAutoConfiguration` exclusion paths still point at SB3 packages and silently fail to exclude anything in user apps | `ApplicationClassInjector` (Liquibase), `GrailsApplicationCompilerAutoConfiguration` (DataSource) | Commit 1 |
| The forward-ported `grails-test-examples-graphql-grails-multi-datastore-app` no longer compiles/runs cleanly on the 8.0.x stack: integration specs missing `extends Specification`, deprecated Logback Groovy DSL config, no MongoDB testcontainer, deprecated `session.datastore` GORM API, and graphql-java 25's stricter scalar `Coercing` signature | Commit 5 |
## Commits
1. **Fix Spring Boot 4 autoconfigure package paths in exclude strings** - updates the three stale SB3 package names used as string literals in `@EnableAutoConfiguration(excludeName=...)` style exclusions and the matching unit test.
2. **Stop pinning graphql-java; let spring-boot-dependencies own its version** - drops the redundant 24.3 pin (and matching `bomDependencies` alias) from `dependencies.gradle` so Spring Boot's 25.0 constraint is the single source of truth.
3. **Add spring-boot-hibernate dep to graphql spring-boot-app for SB4 module split** - adds the runtime dep that SB4's split makes mandatory and explains why `implementation` rather than `compileOnly` is required (GORM's `@AutoConfigureBefore([HibernateJpaAutoConfiguration])` needs the class loaded).
4. **Remove slf4j-simple from dbmigration; Logback is now the only binding** - removes the duplicate SLF4J binding that aborted Logback init under SB4.
5. **Repair graphql multi-datastore-app integration tests on Grails 8 stack** - covers the five interrelated fixes needed to make this newly-included module's integration tests pass (Spock `Specification`, `logback.xml`, mongo testcontainer, modern `GormEnhancer` API, graphql-java 25 `Coercing<ObjectId, String>`).
## Local verification
All testing done locally on the merge commit with these patches applied, JDK 21 (Corretto), Gradle 9.4.1, GRADLE_OPTS=-Xms2G -Xmx5G.
| Task (forced `--rerun-tasks`) | Result |
|---|---|
| `./gradlew testClasses` (CodeQL's failing target) | exit 0, 693 tasks |
| `./gradlew validateDependencyVersions --continue` | exit 0, 186 tasks |
| `./gradlew :grails-data-graphql-core:test` | 254/254 PASSED on graphql-java 25.0 |
| `./gradlew :grails-test-examples-graphql-spring-boot-app:check` | 2/2 PASSED (DemoApplicationTests + AuthorIntegrationTests) |
| `./gradlew :grails-data-hibernate5-dbmigration:integrationTest` | 3/3 PASSED (AutoRunWith{Multiple,Single}DataSourceSpec, DbUpdateCommandSpec) |
| `./gradlew :grails-core:test --tests ...ApplicationClassInjectorSpec` | 8/8 PASSED |
| `./gradlew :grails-shell-cli:test` | 105/105 PASSED |
| `./gradlew :grails-test-examples-graphql-grails-{test,tenant,docs,multi-datastore}-app:integrationTest` | All 4 modules green |
| Final consolidated sweep | **466 PASSED, 0 FAILED, BUILD SUCCESSFUL in 3m 3s, 474 tasks executed** |
## Known caveats outside this PR's scope
- `:grails-data-mongodb-core:test`'s `ProjectionsSpec` is flaky when run in parallel with other modules locally because of testcontainers port races; this failure existed on `fc747cc76a` (pre-merge) too with one of the same tests failing. Not addressed here.
- "CI - Groovy Joint Validation Build" was already failing on `fc747cc76a` (pre-merge), so it is a pre-existing red unrelated to this merge. Not addressed here.
Fixes the CI breakage on 8.0.x introduced by 6ebc60c6d0.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288677677
##########
grails-data-hibernate5/dbmigration/build.gradle:
##########
@@ -75,9 +75,12 @@ dependencies {
testImplementation project(':grails-testing-support-web')
testImplementation 'com.h2database:h2'
- // Liquibase uses JUL for logging -> redirect it to SLF4J to reliably capture its output
+ // Liquibase uses JUL for logging -> redirect it to SLF4J to reliably capture its output.
+ // Spring Boot's starter (transitively via spring-boot-starter-tomcat) already supplies
+ // Logback as the SLF4J binding; adding slf4j-simple here would cause two competing
Review Comment:
Done in 8275577. Dropped the extended explanation.
##########
grails-test-examples/graphql/grails-multi-datastore-app/build.gradle:
##########
@@ -70,6 +70,10 @@ dependencies {
testImplementation 'org.apache.grails:grails-testing-support-datamapping'
testImplementation 'org.apache.grails:grails-testing-support-web'
+
+ // Auto-start a MongoDB testcontainer before integration tests (overrides the
Review Comment:
Done in 8275577. Removed the testcontainer-host comment.
##########
grails-test-examples/graphql/grails-multi-datastore-app/src/integration-test/groovy/myapp/BarIntegrationSpec.groovy:
##########
@@ -43,8 +44,10 @@ class BarIntegrationSpec implements GraphQLSpec {
""")
Map obj = resp.body().data.barCreate
- then:
+ then: 'bar is created in the Mongo datastore with a valid ObjectId'
new ObjectId((String) obj.id)
- Bar.withNewSession { session -> session.datastore instanceof MongoDatastore }
+ // GORM no longer surfaces `datastore` as a property on the Mongo session;
Review Comment:
Done in 8275577.
##########
grails-test-examples/graphql/grails-multi-datastore-app/src/integration-test/groovy/myapp/FooIntegrationSpec.groovy:
##########
@@ -41,8 +43,10 @@ class FooIntegrationSpec implements GraphQLSpec {
""")
Map obj = resp.body().data.fooCreate
- then:
+ then: 'foo is created in the Hibernate datastore'
obj.id == 1
- Foo.withNewSession { session -> session.datastore instanceof HibernateDatastore }
+ // GORM no longer surfaces `datastore` as a property on the Hibernate
Review Comment:
Done in 8275577.
##########
grails-test-examples/graphql/spring-boot-app/build.gradle:
##########
@@ -37,6 +37,13 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
+ // Spring Boot 4 moved HibernateJpaAutoConfiguration to the spring-boot-hibernate module.
+ // It must be on the runtime classpath: GORM's HibernateGormAutoConfiguration
Review Comment:
Done in 8275577. Removed both comment blocks.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#issuecomment-4514151498
## ✅ All tests passed ✅
🏷️ Commit: fcf1f99c408d27f2fe3eed7cde71bd1b5b7da267
▶️ Tests: 31927 executed
⚪️ Checks: 35/35 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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288587095
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
We should still pin the version so we know when to update the scalars version. Otherwise they will drift. The validator plugin will tell us when they mismatch.
##########
grails-test-examples/graphql/grails-multi-datastore-app/build.gradle:
##########
@@ -70,6 +70,10 @@ dependencies {
testImplementation 'org.apache.grails:grails-testing-support-datamapping'
testImplementation 'org.apache.grails:grails-testing-support-web'
+
+ // Auto-start a MongoDB testcontainer before integration tests (overrides the
Review Comment:
Remove the comments, they're unnecessary
##########
grails-data-hibernate5/dbmigration/build.gradle:
##########
@@ -75,9 +75,12 @@ dependencies {
testImplementation project(':grails-testing-support-web')
testImplementation 'com.h2database:h2'
- // Liquibase uses JUL for logging -> redirect it to SLF4J to reliably capture its output
+ // Liquibase uses JUL for logging -> redirect it to SLF4J to reliably capture its output.
+ // Spring Boot's starter (transitively via spring-boot-starter-tomcat) already supplies
+ // Logback as the SLF4J binding; adding slf4j-simple here would cause two competing
Review Comment:
We can remove the explanation for the transitive include. I already did this in the hibernate pr b/c this is the right solution
##########
grails-test-examples/graphql/grails-multi-datastore-app/src/integration-test/groovy/myapp/BarIntegrationSpec.groovy:
##########
@@ -43,8 +44,10 @@ class BarIntegrationSpec implements GraphQLSpec {
""")
Map obj = resp.body().data.barCreate
- then:
+ then: 'bar is created in the Mongo datastore with a valid ObjectId'
new ObjectId((String) obj.id)
- Bar.withNewSession { session -> session.datastore instanceof MongoDatastore }
+ // GORM no longer surfaces `datastore` as a property on the Mongo session;
Review Comment:
Remove the comment
##########
grails-test-examples/graphql/grails-multi-datastore-app/src/integration-test/groovy/myapp/FooIntegrationSpec.groovy:
##########
@@ -41,8 +43,10 @@ class FooIntegrationSpec implements GraphQLSpec {
""")
Map obj = resp.body().data.fooCreate
- then:
+ then: 'foo is created in the Hibernate datastore'
obj.id == 1
- Foo.withNewSession { session -> session.datastore instanceof HibernateDatastore }
+ // GORM no longer surfaces `datastore` as a property on the Hibernate
Review Comment:
Remove the comment
##########
grails-test-examples/graphql/spring-boot-app/build.gradle:
##########
@@ -37,6 +37,13 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
+ // Spring Boot 4 moved HibernateJpaAutoConfiguration to the spring-boot-hibernate module.
+ // It must be on the runtime classpath: GORM's HibernateGormAutoConfiguration
Review Comment:
You can remove teh comments they're self evident by update
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3289732366
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
Putting it back for now to move forward, I do not agree given they are diverged versions and I don't love having to manage versions that spring-boot-dependencies advances for us for free, from security standpoint. If they matched and we could have one variable, I would be on board. I'll create an issue separately.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288716420
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
graphql-java 25 and graphql-java-extended-scalars 24 combo does pass the tests.
No breaking changes required (yet)
The extended-scalars library mostly just provides implementations of the Coercing interface.
In the 24.0 release of extended-scalars, they did a big cleanup: they removed all the deprecated Coercing methods and updated to the modern versions (with GraphQLContext + Locale).
Since then, graphql-java 25 and 26 apparently haven't introduced further breaking changes to the scalar/Coercing APIs that would force a new release of extended-scalars.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#issuecomment-4519764530
## ✅ All tests passed ✅
🏷️ Commit: 8275577532ac431a4a924238c4a3b66261931ee5
▶️ Tests: 31751 executed
⚪️ Checks: 35/35 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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288757709
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
I'm just saying we have to review these versions and make sure they're compatible with each other. The way to do that is to track the versions together. If the library isn't needed we should remove it and then like you said track the spring boot bom.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #15673:
URL: https://github.com/apache/grails-core/pull/15673
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288645304
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
I know 0% about GraphQL, the weird thing is that https://mvnrepository.com/artifact/com.graphql-java/graphql-java-extended-scalars/versions is still on 24 and the rest of GraphQL is on 25+. spring-boot-dependendencies does not include java-extended-scalars. So they are already divergent.
--
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] Fix 8.0.x build break introduced by 7.2.x merge (6ebc60c6d0) [grails-core]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15673:
URL: https://github.com/apache/grails-core/pull/15673#discussion_r3288645304
##########
dependencies.gradle:
##########
@@ -78,7 +78,9 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
- 'graphql-java.version' : '24.3',
+ // graphql-java is managed by spring-boot-dependencies (the SB version always wins),
Review Comment:
I know 0% about GraphQL, the weird thing is that https://mvnrepository.com/artifact/com.graphql-java/graphql-java-extended-scalars/versions is still on 25 and the rest of GraphQL is on 25+. spring-boot-dependendencies does not include java-extended-scalars. So they are already divergent.
--
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