-
Notifications
You must be signed in to change notification settings - Fork 305
Upgrade gradle to v8.14.2 #8950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.007 s) : 0, 1006566
Total [baseline] (10.816 s) : 0, 10815751
Agent [candidate] (997.291 ms) : 0, 997291
Total [candidate] (10.732 s) : 0, 10732027
section appsec
Agent [baseline] (1.174 s) : 0, 1173714
Total [baseline] (10.728 s) : 0, 10728219
Agent [candidate] (1.184 s) : 0, 1184448
Total [candidate] (10.813 s) : 0, 10813300
section iast
Agent [baseline] (1.134 s) : 0, 1134212
Total [baseline] (10.857 s) : 0, 10857160
Agent [candidate] (1.135 s) : 0, 1135359
Total [candidate] (10.807 s) : 0, 10806949
section profiling
Agent [baseline] (1.258 s) : 0, 1257775
Total [baseline] (11.075 s) : 0, 11075444
Agent [candidate] (1.246 s) : 0, 1246014
Total [candidate] (11.009 s) : 0, 11008839
gantt
title petclinic - break down per module: candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (695.092 ms) : 0, 695092
BytebuddyAgent [candidate] (687.759 ms) : 0, 687759
GlobalTracer [baseline] (244.699 ms) : 0, 244699
GlobalTracer [candidate] (243.323 ms) : 0, 243323
AppSec [baseline] (30.717 ms) : 0, 30717
AppSec [candidate] (30.399 ms) : 0, 30399
Debugger [baseline] (6.096 ms) : 0, 6096
Debugger [candidate] (6.031 ms) : 0, 6031
Remote Config [baseline] (665.886 µs) : 0, 666
Remote Config [candidate] (666.227 µs) : 0, 666
Telemetry [baseline] (8.201 ms) : 0, 8201
Telemetry [candidate] (8.199 ms) : 0, 8199
section appsec
BytebuddyAgent [baseline] (709.851 ms) : 0, 709851
BytebuddyAgent [candidate] (717.206 ms) : 0, 717206
GlobalTracer [baseline] (235.879 ms) : 0, 235879
GlobalTracer [candidate] (238.176 ms) : 0, 238176
AppSec [baseline] (170.544 ms) : 0, 170544
AppSec [candidate] (171.267 ms) : 0, 171267
Debugger [baseline] (5.819 ms) : 0, 5819
Debugger [candidate] (5.854 ms) : 0, 5854
Remote Config [baseline] (618.288 µs) : 0, 618
Remote Config [candidate] (635.11 µs) : 0, 635
Telemetry [baseline] (8.162 ms) : 0, 8162
Telemetry [candidate] (8.224 ms) : 0, 8224
IAST [baseline] (22.07 ms) : 0, 22070
IAST [candidate] (22.203 ms) : 0, 22203
section iast
BytebuddyAgent [baseline] (809.156 ms) : 0, 809156
BytebuddyAgent [candidate] (810.248 ms) : 0, 810248
GlobalTracer [baseline] (233.637 ms) : 0, 233637
GlobalTracer [candidate] (233.906 ms) : 0, 233906
AppSec [baseline] (30.469 ms) : 0, 30469
AppSec [candidate] (30.161 ms) : 0, 30161
Debugger [baseline] (5.81 ms) : 0, 5810
Debugger [candidate] (5.814 ms) : 0, 5814
Remote Config [baseline] (587.39 µs) : 0, 587
Remote Config [candidate] (579.252 µs) : 0, 579
Telemetry [baseline] (7.996 ms) : 0, 7996
Telemetry [candidate] (8.023 ms) : 0, 8023
IAST [baseline] (25.672 ms) : 0, 25672
IAST [candidate] (25.643 ms) : 0, 25643
section profiling
ProfilingAgent [baseline] (104.136 ms) : 0, 104136
ProfilingAgent [candidate] (103.011 ms) : 0, 103011
BytebuddyAgent [baseline] (686.24 ms) : 0, 686240
BytebuddyAgent [candidate] (679.149 ms) : 0, 679149
GlobalTracer [baseline] (364.419 ms) : 0, 364419
GlobalTracer [candidate] (362.144 ms) : 0, 362144
AppSec [baseline] (32.664 ms) : 0, 32664
AppSec [candidate] (32.176 ms) : 0, 32176
Debugger [baseline] (10.03 ms) : 0, 10030
Debugger [candidate] (12.198 ms) : 0, 12198
Remote Config [baseline] (666.493 µs) : 0, 666
Remote Config [candidate] (654.508 µs) : 0, 655
Telemetry [baseline] (9.537 ms) : 0, 9537
Telemetry [candidate] (8.032 ms) : 0, 8032
Profiling [baseline] (104.16 ms) : 0, 104160
Profiling [candidate] (103.035 ms) : 0, 103035
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (999.934 ms) : 0, 999934
Total [baseline] (8.58 s) : 0, 8579706
Agent [candidate] (999.373 ms) : 0, 999373
Total [candidate] (8.599 s) : 0, 8598920
section iast
Agent [baseline] (1.133 s) : 0, 1133434
Total [baseline] (9.345 s) : 0, 9345453
Agent [candidate] (1.136 s) : 0, 1135612
Total [candidate] (9.274 s) : 0, 9273668
gantt
title insecure-bank - break down per module: candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (690.035 ms) : 0, 690035
BytebuddyAgent [candidate] (689.575 ms) : 0, 689575
GlobalTracer [baseline] (243.43 ms) : 0, 243430
GlobalTracer [candidate] (243.398 ms) : 0, 243398
AppSec [baseline] (30.386 ms) : 0, 30386
AppSec [candidate] (30.521 ms) : 0, 30521
Debugger [baseline] (6.102 ms) : 0, 6102
Debugger [candidate] (6.086 ms) : 0, 6086
Remote Config [baseline] (675.72 µs) : 0, 676
Remote Config [candidate] (673.33 µs) : 0, 673
Telemetry [baseline] (8.298 ms) : 0, 8298
Telemetry [candidate] (8.234 ms) : 0, 8234
section iast
BytebuddyAgent [baseline] (809.054 ms) : 0, 809054
BytebuddyAgent [candidate] (810.52 ms) : 0, 810520
GlobalTracer [baseline] (233.518 ms) : 0, 233518
GlobalTracer [candidate] (234.032 ms) : 0, 234032
IAST [baseline] (27.162 ms) : 0, 27162
IAST [candidate] (27.98 ms) : 0, 27980
AppSec [baseline] (28.481 ms) : 0, 28481
AppSec [candidate] (27.768 ms) : 0, 27768
Debugger [baseline] (5.862 ms) : 0, 5862
Debugger [candidate] (5.833 ms) : 0, 5833
Remote Config [baseline] (580.811 µs) : 0, 581
Remote Config [candidate] (580.465 µs) : 0, 580
Telemetry [baseline] (7.996 ms) : 0, 7996
Telemetry [candidate] (7.992 ms) : 0, 7992
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section baseline
no_agent (37.642 ms) : 37338, 37946
. : milestone, 37642,
appsec (47.236 ms) : 46811, 47660
. : milestone, 47236,
code_origins (45.218 ms) : 44842, 45594
. : milestone, 45218,
iast (44.684 ms) : 44295, 45073
. : milestone, 44684,
profiling (49.616 ms) : 49089, 50144
. : milestone, 49616,
tracing (44.873 ms) : 44498, 45248
. : milestone, 44873,
section candidate
no_agent (37.402 ms) : 37093, 37711
. : milestone, 37402,
appsec (46.898 ms) : 46489, 47307
. : milestone, 46898,
code_origins (45.991 ms) : 45609, 46372
. : milestone, 45991,
iast (45.669 ms) : 45268, 46069
. : milestone, 45669,
profiling (46.689 ms) : 46245, 47133
. : milestone, 46689,
tracing (43.447 ms) : 43093, 43802
. : milestone, 43447,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section baseline
no_agent (4.472 ms) : 4421, 4523
. : milestone, 4472,
iast (9.293 ms) : 9144, 9442
. : milestone, 9293,
iast_FULL (13.724 ms) : 13452, 13996
. : milestone, 13724,
iast_GLOBAL (9.79 ms) : 9618, 9961
. : milestone, 9790,
profiling (8.851 ms) : 8715, 8988
. : milestone, 8851,
tracing (7.761 ms) : 7641, 7881
. : milestone, 7761,
section candidate
no_agent (4.334 ms) : 4285, 4382
. : milestone, 4334,
iast (8.936 ms) : 8794, 9077
. : milestone, 8936,
iast_FULL (13.561 ms) : 13291, 13831
. : milestone, 13561,
iast_GLOBAL (10.092 ms) : 9917, 10267
. : milestone, 10092,
profiling (8.72 ms) : 8586, 8853
. : milestone, 8720,
tracing (7.66 ms) : 7543, 7777
. : milestone, 7660,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section baseline
no_agent (15.662 s) : 15662000, 15662000
. : milestone, 15662000,
appsec (14.944 s) : 14944000, 14944000
. : milestone, 14944000,
iast (18.69 s) : 18690000, 18690000
. : milestone, 18690000,
iast_GLOBAL (18.052 s) : 18052000, 18052000
. : milestone, 18052000,
profiling (15.481 s) : 15481000, 15481000
. : milestone, 15481000,
tracing (14.849 s) : 14849000, 14849000
. : milestone, 14849000,
section candidate
no_agent (14.934 s) : 14934000, 14934000
. : milestone, 14934000,
appsec (14.735 s) : 14735000, 14735000
. : milestone, 14735000,
iast (18.684 s) : 18684000, 18684000
. : milestone, 18684000,
iast_GLOBAL (18.112 s) : 18112000, 18112000
. : milestone, 18112000,
profiling (15.962 s) : 15962000, 15962000
. : milestone, 15962000,
tracing (14.786 s) : 14786000, 14786000
. : milestone, 14786000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~fa6c44c77d, baseline=1.51.0-SNAPSHOT~d6d3d210b1
dateFormat X
axisFormat %s
section baseline
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (2.407 ms) : 2358, 2455
. : milestone, 2407,
iast (2.192 ms) : 2130, 2254
. : milestone, 2192,
iast_GLOBAL (2.23 ms) : 2168, 2292
. : milestone, 2230,
profiling (2.066 ms) : 2014, 2119
. : milestone, 2066,
tracing (2.0 ms) : 1953, 2047
. : milestone, 2000,
section candidate
no_agent (1.477 ms) : 1465, 1489
. : milestone, 1477,
appsec (2.401 ms) : 2351, 2450
. : milestone, 2401,
iast (2.184 ms) : 2122, 2246
. : milestone, 2184,
iast_GLOBAL (2.243 ms) : 2181, 2305
. : milestone, 2243,
profiling (2.029 ms) : 1980, 2079
. : milestone, 2029,
tracing (2.004 ms) : 1957, 2052
. : milestone, 2004,
|
telemetry/src/test/groovy/datadog/telemetry/metric/MetricPeriodicActionTest.groovy
Show resolved
Hide resolved
I believe the failure in if (currentJavaHomePath != testJvmHomePath) {
- def jvmSpec = new SpecificInstallationToolchainSpec(project.getObjects(), file(testJvmHomePath))
+ def jvmSpec = new SpecificInstallationToolchainSpec(project.services.get(org.gradle.api.internal.provider.PropertyFactory), file(testJvmHomePath))
// The provider always says that a value is present so we need to wrap it for proper error messages
Provider<JavaLauncher> launcher = providers.provider { This object is internal and has to use this internal API, there's no other options at this time I think. |
@@ -7,7 +7,7 @@ okhttp-legacy = "[3.0,3.12.12]" # 3.12.x is last version to support Java7 | |||
okio = "1.17.6" # Datadog fork | |||
|
|||
spock = "2.3-groovy-3.0" | |||
groovy = "3.0.17" | |||
groovy = "3.0.24" | |||
junit5 = "5.9.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When upgrading from Gradle <= 8.13, Groovy needs to be upgraded to 3.0.24: https://docs.gradle.org/current/userguide/upgrading_version_8.html#upgrade_to_groovy_3_0_24
@@ -27,7 +27,7 @@ final testTasks = scalaVersions.collect { scalaLibrary -> | |||
def (major, minor) = version.split('_').collect(Integer.&valueOf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in this file address aesthetic comments in the previous Gradle upgrade #8886
this.collector = collector | ||
} | ||
|
||
@Override | ||
@NonNull | ||
MetricCollector<Metric> collector() { | ||
MetricCollector<MetricCollector.Metric> collector() { | ||
return collector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, upgrading Gradle leads to the new(?) error The type Metric is not a valid substitute for the bounded parameter <M extends datadog.trace.api.telemetry.MetricCollector$Metric>
. To resolve this, we needed strict type resolution to distinguish MetricCollector.Metric
and the imported datadog.telemetry.api.Metric
class. This type strictness follows patterns to explicitly use MetricCollector.Metric
throughout the file.
|
||
project.dependencies { | ||
"${testSuiteName}Implementation"(project(project.path)) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Project dependencies was separated out due to the error The value for property 'dependencies.implementation' property 'dependencies' is final and cannot be changed any further.
that prevented Gradle compilation. I think this is due to the deprecation of mutating configurations after observation that was introduced after 8.7: https://docs.gradle.org/current/userguide/upgrading_version_8.html#mutate_configuration_after_locking
@@ -164,7 +164,7 @@ project.afterEvaluate { | |||
def testJvmHomePath = getJavaHomePath(testJvmHome) | |||
// Only change test JVM if it's not the one we are running the gradle build with | |||
if (currentJavaHomePath != testJvmHomePath) { | |||
def jvmSpec = new SpecificInstallationToolchainSpec(project.getObjects(), file(testJvmHomePath)) | |||
def jvmSpec = new SpecificInstallationToolchainSpec(project.services.get(org.gradle.api.internal.provider.PropertyFactory), file(testJvmHomePath)) | |||
// The provider always says that a value is present so we need to wrap it for proper error messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is needed due to the introduced error groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.gradle.jvm.toolchain.internal.SpecificInstallationToolchainSpec(org.gradle.api.internal.model.DefaultObjectFactory, File)
. I'm not sure exactly where this comes from, but since this is part of Gradle's internal implementation, breaking changes can be made unannounced.
runUnderTrace("listen$i") {} | ||
} | ||
|
||
@Override | ||
void operationProgressed(Future<?> future, long progress, long total) throws Exception { | ||
void operationProgressed(ProgressiveFuture<?> future, long progress, long total) throws Exception { | ||
runUnderTrace("progress$i") {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GenericProgressiveFutureListener argument extends ProgressiveFuture (ref), and for some reason with the Gradle upgrade, I get the error: The type Future is not a valid substitute for the bounded parameter <F extends io.netty.util.concurrent.ProgressiveFuture<?>>
. Explicitly setting the type to ProgressiveFuture
instead of Future
resolved this.
@@ -55,7 +55,7 @@ public void methodAdvice(MethodTransformer transformer) { | |||
public static class Construct { | |||
@Advice.OnMethodExit(suppress = Throwable.class) | |||
public static void afterConstructor( | |||
@Advice.This final BuildScopeServices buildScopeServices, | |||
@Advice.This final DefaultServiceRegistry buildScopeServices, | |||
@Advice.Argument(0) final ServiceRegistry parentServices) { | |||
CiVisibilityGradleListenerInjector_8_3.injectCiVisibilityGradleListener( | |||
buildScopeServices, parentServices); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying to ./gradlew clean assemble
, I ran across the error incompatible types: org.gradle.internal.service.scopes.BuildScopeServices cannot be converted to org.gradle.internal.service.DefaultServiceRegistry
. Explicitly setting the buildScopeServices
type to DefaultServiceRegistry
(which is what injectCiVisibilityGradleListener takes) resolves this.
I'm thinking that the Gradle upgrade has led to stricter type resolution as seen from errors->updates made below 🤔
@@ -1,10 +1,9 @@ | |||
|
|||
apply from: "$rootDir/gradle/java.gradle" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updates to the latest version of JUnit Jupiter and Platform address the error:
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests...
Caused by: org.junit.platform.commons.JUnitException: OutputDirectoryProvider not available; probably due to unaligned versions of the junit-platform-engine and junit-platform-launcher jars on the classpath/module path.
I'm honestly not quite sure why the gradle upgrade initiated this. Others have faced the same problem (unplanned junit issue) and also resolved it by switching the versions.
You may want to merge latest master, there were fixes on the gradle daemon smoke tests, see #8955 Unsure about the muzzle ones. |
d8450d8
to
0bb8eab
Compare
@@ -60,7 +60,7 @@ class GradleLauncherSmokeTest extends AbstractGradleTest { | |||
]) | |||
String[] command = ["./gradlew", "--no-daemon", "--info"] | |||
if (gradleDaemonCmdLineParams) { | |||
command += "-Dorg.gradle.jvmargs=$gradleDaemonCmdLineParams" | |||
command += "-Dorg.gradle.jvmargs=$gradleDaemonCmdLineParams".toString() | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This resolves errors I was getting with assigning GStringImpl to String[] (others' experiences: apache issue, stackoverflow issue). Seems like this should be resolved with groovy 3.0.7+, but I guess not…
581e03a
to
fa6c44c
Compare
What Does This Do
Upgrade gradle to v8.14.2
Motivation
Upgrade to the latest version of gradle (now supports Java 24!)
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]