Skip to content

Bump org.codehaus.groovy:groovy-all from 2.4.21 to 3.0.25#18469

Open
yashmayya wants to merge 1 commit into
apache:masterfrom
yashmayya:bump-groovy-3.0.25
Open

Bump org.codehaus.groovy:groovy-all from 2.4.21 to 3.0.25#18469
yashmayya wants to merge 1 commit into
apache:masterfrom
yashmayya:bump-groovy-3.0.25

Conversation

@yashmayya
Copy link
Copy Markdown
Contributor

@yashmayya yashmayya commented May 11, 2026

Supersedes #18461, which fails because Groovy 3.x publishes groovy-all as a POM aggregator rather than a fat JAR — Dependabot's straight version bump leaves Maven looking for groovy-all-3.0.25.jar on Central, which 404s.

Changes

  • pom.xml: bump groovy-all 2.4.21 → 3.0.25, rename property to groovy.version, add <type>pom</type> so Maven resolves the aggregator.
  • pinot-spi/pom.xml: mirror <type>pom</type> on the consumer dep.
  • Add <exclusions> for groovy-testng, groovy-test-junit5, and groovy-test. These three transitively drag in TestNG/JUnit jars that collide with Surefire's TestNG fork on the unit-test runner and crash unrelated test classes with NoClassDefFoundError: org/apache/pinot/client/admin/PinotAdminException (which an earlier revision of this PR reproduced — see commit history).

Everything else the 3.x aggregator pulls in is kept so the runtime Groovy stdlib surface user transform/filter scripts may rely on from the old 2.4.21 fat jar — groovy.util.CliBuilder (now in groovy-cli-picocli), groovy.jmx.builder.JmxBuilder (now in groovy-jmx), groovy.swing.*, groovy.servlet.*, groovy.ant.*, groovy.console.*, JsonSlurper, XmlSlurper, groovy.sql.Sql, date/time helpers, etc. — keeps working.

Confirmed via mvn dependency:tree on pinot-spi:

  • present: groovy, groovy-ant, groovy-astbuilder, groovy-cli-picocli, groovy-console, groovy-datetime, groovy-docgenerator, groovy-groovydoc, groovy-groovysh, groovy-jmx, groovy-json, groovy-jsr223, groovy-macro, groovy-nio, groovy-servlet, groovy-sql, groovy-swing, groovy-templates, groovy-xml
  • excluded: groovy-testng, groovy-test-junit5, groovy-test

Test plan

Groovy-touching tests across affected modules:

Module Test Result
pinot-spi GroovyTemplateUtilsTest, IngestionJobLauncherTest 10/10
pinot-core GroovyFunctionEvaluatorTest, SchemaUtilsTest, PartitionerTest, TransformQueriesTest 36/36
pinot-broker full module test suite 239 tests, no SurefireBooterForkException/NoClassDefFoundError — the CI failure pattern from the previous push is gone

SecureASTCustomizer API surface (setImportsWhitelist, setReceiversWhiteList, addExpressionCheckers, MethodCallExpression, ImportCustomizer, …) is unchanged between Groovy 2.4 and 3.0; the malicious-script blocklist (System.exit, .execute(), metaClass tricks, PinotAdministrator.main) continues to be rejected.

@yashmayya yashmayya added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels May 11, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.69%. Comparing base (dc4251a) to head (3a72f91).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18469      +/-   ##
============================================
+ Coverage     63.66%   63.69%   +0.02%     
  Complexity     1685     1685              
============================================
  Files          3266     3266              
  Lines        199821   199821              
  Branches      31022    31022              
============================================
+ Hits         127222   127275      +53     
+ Misses        62459    62407      -52     
+ Partials      10140    10139       -1     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 63.69% <ø> (+0.02%) ⬆️
temurin 63.69% <ø> (+0.02%) ⬆️
unittests 63.69% <ø> (+0.02%) ⬆️
unittests1 55.84% <ø> (+0.03%) ⬆️
unittests2 34.94% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yashmayya yashmayya force-pushed the bump-groovy-3.0.25 branch from b34e609 to a676ccf Compare May 12, 2026 18:50
Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one high-signal compatibility issue; see inline comment.

Comment thread pinot-spi/pom.xml Outdated
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<artifactId>groovy</artifactId>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This narrows Pinot's shipped Groovy runtime from the old groovy-all fat jar to a hand-picked subset, which is a backward-compat break for clusters that have Groovy enabled. Pinot can run with Groovy static analysis unset, and the current 2.4 jar on the runtime classpath includes classes like groovy.util.CliBuilder and groovy.jmx.builder.JmxBuilder; those disappear with this dependency list, so existing transform/query scripts can start failing with ClassNotFoundException after upgrade even though CI stays green. This needs either a compatibility-preserving runtime surface or an explicit breaking-change rollout plus parity coverage for the supported Groovy modules.`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — you're right that the per-module list dropped real classes (CliBuilder is in groovy-cli-picocli in 3.x, JmxBuilder in groovy-jmx), and CI being green only proved the Pinot-Java surface, not customer transform scripts.

Updated to <type>pom</type> + <exclusions> for just groovy-testng / groovy-test-junit5 / groovy-test — those three are what dragged in the conflicting TestNG/JUnit jars that crashed Surefire's fork last time. Everything else from the 2.4 fat-jar surface is back on the classpath. Verified via mvn dependency:tree:

\- org.codehaus.groovy:groovy-all:pom:3.0.25:compile
   +- groovy, groovy-ant, groovy-astbuilder, groovy-cli-picocli,
   +- groovy-console, groovy-datetime, groovy-docgenerator,
   +- groovy-groovydoc, groovy-groovysh, groovy-jmx, groovy-json,
   +- groovy-jsr223, groovy-macro, groovy-nio, groovy-servlet,
   +- groovy-sql, groovy-swing, groovy-templates, groovy-xml

(groovy-testng/groovy-test-junit5/groovy-test absent as expected.)

Locally re-ran the full pinot-broker test suite — no SurefireBooterForkException / NoClassDefFoundError pattern from the previous push.

In Groovy 3.x, groovy-all is published as a POM aggregator rather than a
fat JAR, so the dependency needs <type>pom</type>. The aggregator's
transitive groovy-testng / groovy-test-junit5 / groovy-test jars however
collide with Surefire's TestNG fork classpath on the unit-test runners
and crash unrelated test classes with NoClassDefFoundError, so those
three sub-modules are excluded. Everything else (groovy core, templates,
json, xml, sql, jmx, swing, ant, cli-picocli, datetime, nio, jsr223,
console, etc.) is kept so user transform/filter scripts that relied on
the old fat-jar runtime surface (e.g. CliBuilder, JmxBuilder, JsonSlurper)
continue to work.
@yashmayya yashmayya force-pushed the bump-groovy-3.0.25 branch from a676ccf to 3a72f91 Compare May 13, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants