jamesfredley opened a new pull request, #15649: URL: https://github.com/apache/grails-core/pull/15649
## Summary The Groovy joint validation build ([CI - Groovy Joint Validation Build](https://github.com/apache/grails-core/actions/workflows/groovy-joint-workflow.yml)) has been failing on `8.0.x` since 2026-05-07 with: ``` GroovyChangeLogSpec > updates a database with Groovy Change FAILED Condition not satisfied: output.toString().contains('confirmation message') ``` The captured `output` has the standard Liquibase UI messages (`Running Changeset`, `UPDATE SUMMARY`, `Liquibase: Update has been successful`) but is missing per-changeset log lines that go through SLF4J / Logback - specifically the `confirmation message` emitted from `ChangeSet.execute()` via `log.info(change.getConfirmationMessage())`. ## Root cause `grails-data-hibernate5/dbmigration/src/test/resources/logback.groovy` is a Groovy-DSL Logback configuration: ```groovy appender('STDOUT', ConsoleAppender) { withJansi = true encoder(PatternLayoutEncoder) { pattern = '%d{HH:mm:ss.SSS} [%t] %highlight(%p) %cyan(\\(%logger{39}\\)) %m%n' } } root(ERROR, ['STDOUT']) logger("liquibase", DEBUG, ['STDOUT'], false) ``` This relies on: 1. **The Groovy runtime being on the test JVM classpath at Logback init time** so Logback's `GroovyConfigurator` can compile and evaluate the script. 2. **Jansi** for ANSI colour rendering (`withJansi = true`). 3. The **`%highlight` / `%cyan` converters**. In the joint validation environment, the freshly-built local Groovy 5.0.6-SNAPSHOT (`GROOVY_5_0_X` HEAD, post 5.0.6 release) interacts with Logback's `GroovyConfigurator` in a way that silently fails to register the `liquibase` logger -> `STDOUT` binding. As a result, `log.info(...)` calls from Liquibase's `ChangeSet.execute()` go nowhere and the test assertion fails. The same test passes locally and in the main `CI` workflow because both environments end up wiring SLF4J differently from the joint build. ## Fix Replace `src/test/resources/logback.groovy` with an equivalent `src/test/resources/logback-test.xml`: ```xml <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%t] %p %logger{39} - %m%n</pattern> </encoder> </appender> <root level="ERROR"><appender-ref ref="STDOUT"/></root> <logger name="liquibase" level="DEBUG" additivity="false"><appender-ref ref="STDOUT"/></logger> <logger name="org.grails.datastore.gorm.GormEnhancer" level="INFO" additivity="false"><appender-ref ref="STDOUT"/></logger> <logger name="org.grails.plugin.datasource.TomcatJDBCPoolMBeanExporter" level="WARN" additivity="false"><appender-ref ref="STDOUT"/></logger> </configuration> ``` Same logger levels and appender wiring, just XML. No Groovy / Jansi / colour-converter dependencies, so this works regardless of which Groovy version is on the test JVM classpath. ## Verification ``` ./gradlew :grails-data-hibernate5-dbmigration:test \ --tests 'org.grails.plugins.databasemigration.liquibase.GroovyChangeLogSpec' \ -PmaxTestParallel=3 --rerun-tasks BUILD SUCCESSFUL in 1m 21s (7 tests, 7 successes, 0 failures, 0 skipped) ``` ## Context Surfaced while auditing PR #15557 (Groovy 5 / Spring Boot 4 upgrade) where `build_grails` (the joint validation step) was the only outstanding Groovy joint validation failure on both `8.0.x` and the upgrade branch. Once #15557 lands, this fix will continue to be relevant because the same logback config issue is unrelated to the upgrade. Last green joint validation on 8.0.x: `aadc47c59b` (2026-05-03). First red: `8f711231e0` (2026-05-07, the 8.0.0-M1 merge-back commit). The change in failure status correlates with the pace at which `GROOVY_5_0_X` advanced (post-5.0.6 release commits including GROOVY-11989 javaparser bump, GROOVY-11990 jackson bump, GROOVY-11996 file truthiness flag) - any of which could have shifted classloader behaviour during Logback's Groovy-script init. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
