Skip to content

Upgrade Groovy to 5.1.1 - #16235

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

Upgrade Groovy to 5.1.1#16235
sbglasius wants to merge 2 commits 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.8278%. Comparing base (5670a65) to head (e553877).
⚠️ Report is 6 commits behind head on 8.0.x.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #16235        +/-   ##
==================================================
+ Coverage     54.8238%   54.8278%   +0.0040%     
- Complexity      20521      20525         +4     
==================================================
  Files            2104       2104                
  Lines          101102     101102                
  Branches        17932      17932                
==================================================
+ Hits            55428      55432         +4     
+ Misses          37787      37784         -3     
+ Partials         7887       7886         -1     

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.

@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
@testlens-app

testlens-app Bot commented Sep 4, 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 / Functional Tests (Java 21, indy=true) > :grails-test-examples-scaffolding:integrationTest

Test Runs Flakiness
UserControllerSpec > User list 4% 🟡

🏷️ Commit: e553877
▶️ Tests: 67705 executed
⚪️ Checks: 89/89 completed

Test Failures

UserControllerSpec > User list (:grails-test-examples-scaffolding:integrationTest in CI / Functional Tests (Java 21, indy=true))
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:41)
	at geb.Page.waitFor(Page.groovy:120)
	at com.example.pages.LoginPage.login(LoginPage.groovy:39)
	at com.example.UserControllerSpec.User list(UserControllerSpec.groovy:48)
Caused by: Assertion failed: 

title != pageTitle && $('input', name: 'username').empty
|     |  |         |
|     |  |         false
|     |  '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

Rerun Controls

Select tests to mute in this pull request:

  • UserControllerSpec > User list

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.

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.

4 participants