You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by GitBox <gi...@apache.org> on 2026/05/21 23:53:15 UTC
[GH] (grails-core/fix/8.0.x-merge-sb4-fallout): Workflow run "CodeQL" is working again!
The GitHub Actions job "CodeQL" on grails-core.git/fix/8.0.x-merge-sb4-fallout has succeeded.
Run started by GitHub user jamesfredley (triggered by jamesfredley).
Head commit for run:
13354e28b0d2dbf5052f38225d7cf318beadf855 / James Fredley <ja...@users.noreply.github.com>
Repair graphql multi-datastore-app integration tests on Grails 8 stack
The merge from 7.2.x moved this example into the main settings.gradle
for the first time on 8.0.x. The forward port surfaced three
independent regressions that together made :integrationTest fail with
"no tests discovered" and then with broken assertions once discovery
was restored.
1) Spock test discovery. FooIntegrationSpec and BarIntegrationSpec
were declared as `class X implements GraphQLSpec` without extending
spock.lang.Specification, so JUnit's Spock engine never recognised
them as tests. With nothing to run, the Grails @Integration
bootstrapper never even tried to start a Spring context and
Gradle 8.3+ raised "no tests discovered" rather than running them.
Both specs are now `class X extends Specification implements
GraphQLSpec` to match the sibling graphql examples.
2) Logback configuration format. The app shipped a logback.groovy.
Logback's Groovy DSL was removed in logback-classic 1.5; on the
8.0.x stack that file is now read by the XML parser and aborts
with SAXParseException "Content is not allowed in prolog". Convert
the file to an equivalent logback.xml.
3) MongoDB infrastructure. The application.yml binds MongoDB at
localhost:27017 with no fallback. The main Build Grails-Core CI
job and local builds do not start a MongoDB, so the Spring context
could not initialise even after test discovery was fixed. Add
integrationTestImplementation
'org.apache.grails.testing:grails-testing-support-mongodb' so a
MongoDB testcontainer is started for the integration test JVM and
the host/port are injected via grails.mongodb.host.
4) GORM datastore lookup. Both specs asserted
`session.datastore instanceof HibernateDatastore / MongoDatastore`
inside a withNewSession closure. On the modern GORM/Hibernate
stack the closure receives org.hibernate.internal.SessionImpl which
does not expose a `datastore` property; the assertion blew up with
MissingPropertyException. Replace with GormEnhancer.findStaticApi
which is the public entry point that survives the upgrade.
5) graphql-java 25 scalar serialisation. MyGraphQLCustomizer declared
Coercing<ObjectId, ObjectId> and returned an ObjectId from
serialize. graphql-java 25 no longer toString()'s the returned
scalar value during serialisation; it serialises the bean's
structured properties (timestamp/date) instead. The custom scalar
is changed to Coercing<ObjectId, String> and serialize now returns
the 24 character hex form, matching the existing scalar
description and what BarIntegrationSpec parses with new ObjectId.
After these changes :integrationTest passes 2/2 locally on the merge
commit with my other fixes applied.
Assisted-by: claude-code:claude-opus-4-7
Report URL: https://github.com/apache/grails-core/actions/runs/26259341434
With regards,
GitHub Actions via GitBox