Skip to content

Upgrade Groovy to 5.1.1 - #16235

Draft
sbglasius wants to merge 1 commit into
apache:8.0.xfrom
sbglasius:chore/upgrade-groovy-5.1.1
Draft

Upgrade Groovy to 5.1.1#16235
sbglasius wants to merge 1 commit into
apache:8.0.xfrom
sbglasius:chore/upgrade-groovy-5.1.1

Conversation

@sbglasius

Copy link
Copy Markdown
Contributor

Summary

  • Bumps groovy.version from 5.1.0 to 5.1.1 in dependencies.gradle (both the primary BOM pin and the duplicate literal used by grails-micronaut-bom/grails-hibernate5-micronaut-bom)
  • Fixes stale "5.0.x" Groovy version references in AGENTS.md/CLAUDE.md and the groovy-developer, gradle-developer, and grails-developer skill docs, which had drifted from the prior 5.1.0 bump

Groovy 5.1.1 is a maintenance release on the 5.1.x line, fixing:

  • GROOVY-12142: Metaspace leak on parallel Tomcat deployments
  • GROOVY-12166: static type checking regression causing ClassCastException on instanceof-narrowed fields
  • GROOVY-12257: Groovy 4/5 @Immutable bytecode incompatibility
  • GROOVY-12286: bumps its own Jackson dependency to 2.22.2 (already independently pinned in this repo's BOM, so no further change needed here)

See the changelog.

Test plan

  • ./gradlew clean build -PskipTests succeeds
  • ./gradlew validateDependencyVersions — one pre-existing, unrelated failure (org.graalvm.sdk:nativeimage version drift in the micronaut example projects) confirmed to also occur on unmodified 5.1.0, so not introduced by this change
  • Full test suite / style / violation checks left to CI per project convention

Bumps the framework's groovy.version pin (both the primary BOM and the
grails-micronaut-bom/grails-hibernate5-micronaut-bom literal) from
5.1.0 to 5.1.1, which fixes a Metaspace leak on parallel Tomcat
deployments (GROOVY-12142), a static type checking regression causing
ClassCastException on instanceof-narrowed fields (GROOVY-12166), and a
Groovy 4/5 @immutable bytecode incompatibility (GROOVY-12257). Also
corrects stale "5.0.x" references in CLAUDE.md/AGENTS.md and the
groovy/gradle/grails developer skill docs that had drifted from the
prior 5.1.0 bump.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.1330%. Comparing base (351652b) to head (4b3a340).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #16235        +/-   ##
==================================================
- Coverage     54.1488%   54.1330%   -0.0158%     
+ Complexity      20258      20254         -4     
==================================================
  Files            2098       2098                
  Lines          100920     100920                
  Branches        17898      17898                
==================================================
- Hits            54647      54631        -16     
- Misses          38484      38502        +18     
+ Partials         7789       7787         -2     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app

testlens-app Bot commented Aug 27, 2026

Copy link
Copy Markdown

🚨 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 / Build Grails-Core (Windows JDK 25 shard 0) > :grails-wrapper:test

Test Runs Flakiness
GrailsUpdaterSpec > remote wrapper rejects HTTP redirect responses 🚫 ✅ ✅ ❌ 1% 🟡

🏷️ Commit: 4b3a340
▶️ Tests: 68700 executed
⚪️ Checks: 83/83 completed

Test Failures

GrailsUpdaterSpec > remote wrapper rejects HTTP redirect responses (:grails-wrapper:test in CI / Build Grails-Core (Windows JDK 25 shard 0))
Condition not satisfied:

server.verify()
|      |
|      false
<io.github.cjstehno.ersatz.GroovyErsatzServer@4e0dec0c underlyingServer=inaccessible serverConfig=inaccessible>

	at grails.init.GrailsUpdaterSpec.remote wrapper rejects HTTP redirect responses(GrailsUpdaterSpec.groovy:87)

Rerun Controls

Select tests to mute in this pull request:

  • GrailsUpdaterSpec > remote wrapper rejects HTTP redirect responses

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/docs.

@sbglasius

Copy link
Copy Markdown
Contributor Author

I cannot merge this as long as there is an OutOfMemory Exception being thrown. On slack @paulk-asert mentioned:

We have had another user report increased memory requirements for 5.1.1 over 5.1.0, the suggestion for them while we try to find a better fix is to bump up their mem spec to -Xmx512m.

You could also potentially test against:
apache/groovy#2840

And @jamesfredley has created a potential fix for it here #16167

So perhaps 5.1.1 is not suitable as it is?

@matrei / @jdaugherty since you approved this, what are your thoughts?

@matrei

matrei commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

since you approved this, what are your thoughts?

@sbglasius I think we hold off 5.1.1 until there is a fix for the memory problem.

@matrei
matrei self-requested a review August 28, 2026 12:03
@sbglasius
sbglasius marked this pull request as draft August 28, 2026 12:10
@sbglasius

Copy link
Copy Markdown
Contributor Author

I have changed this PR to draft for the time being, until the issue with Groovy 5.1.1 is resolved.

@sbglasius
sbglasius requested a review from jdaugherty August 28, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants