-
Notifications
You must be signed in to change notification settings - Fork 304
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 57 metrics, 14 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.022 s) : 0, 1021903
Total [baseline] (8.512 s) : 0, 8511823
Agent [candidate] (1.02 s) : 0, 1020066
Total [candidate] (8.496 s) : 0, 8495762
section iast
Agent [baseline] (1.147 s) : 0, 1147463
Total [baseline] (9.163 s) : 0, 9163421
Agent [candidate] (1.156 s) : 0, 1156243
Total [candidate] (9.179 s) : 0, 9179263
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.153 s) : 0, 1152754
Total [baseline] (9.133 s) : 0, 9133349
Agent [candidate] (1.164 s) : 0, 1164168
Total [candidate] (9.175 s) : 0, 9174834
section iast_TELEMETRY_OFF
Agent [baseline] (1.143 s) : 0, 1143114
Total [baseline] (9.221 s) : 0, 9220555
Agent [candidate] (1.145 s) : 0, 1145264
Total [candidate] (9.219 s) : 0, 9219433
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.853 ms) : 0, 682853
BytebuddyAgent [candidate] (681.711 ms) : 0, 681711
GlobalTracer [baseline] (239.981 ms) : 0, 239981
GlobalTracer [candidate] (240.035 ms) : 0, 240035
AppSec [baseline] (57.373 ms) : 0, 57373
AppSec [candidate] (55.914 ms) : 0, 55914
Debugger [baseline] (6.121 ms) : 0, 6121
Debugger [candidate] (6.149 ms) : 0, 6149
Remote Config [baseline] (742.741 µs) : 0, 743
Remote Config [candidate] (730.936 µs) : 0, 731
Telemetry [baseline] (11.248 ms) : 0, 11248
Telemetry [candidate] (12.07 ms) : 0, 12070
section iast
BytebuddyAgent [baseline] (801.104 ms) : 0, 801104
BytebuddyAgent [candidate] (807.168 ms) : 0, 807168
GlobalTracer [baseline] (230.071 ms) : 0, 230071
GlobalTracer [candidate] (231.902 ms) : 0, 231902
IAST [baseline] (29.138 ms) : 0, 29138
IAST [candidate] (27.005 ms) : 0, 27005
AppSec [baseline] (49.387 ms) : 0, 49387
AppSec [candidate] (52.175 ms) : 0, 52175
Debugger [baseline] (5.9 ms) : 0, 5900
Debugger [candidate] (5.924 ms) : 0, 5924
Remote Config [baseline] (585.355 µs) : 0, 585
Remote Config [candidate] (653.086 µs) : 0, 653
Telemetry [baseline] (7.841 ms) : 0, 7841
Telemetry [candidate] (7.82 ms) : 0, 7820
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (802.449 ms) : 0, 802449
BytebuddyAgent [candidate] (812.058 ms) : 0, 812058
GlobalTracer [baseline] (232.121 ms) : 0, 232121
GlobalTracer [candidate] (233.148 ms) : 0, 233148
IAST [baseline] (26.141 ms) : 0, 26141
IAST [candidate] (25.851 ms) : 0, 25851
AppSec [baseline] (53.833 ms) : 0, 53833
AppSec [candidate] (54.641 ms) : 0, 54641
Debugger [baseline] (6.015 ms) : 0, 6015
Debugger [candidate] (6.066 ms) : 0, 6066
Remote Config [baseline] (617.496 µs) : 0, 617
Remote Config [candidate] (614.529 µs) : 0, 615
Telemetry [baseline] (8.015 ms) : 0, 8015
Telemetry [candidate] (8.05 ms) : 0, 8050
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (795.975 ms) : 0, 795975
BytebuddyAgent [candidate] (797.272 ms) : 0, 797272
GlobalTracer [baseline] (230.284 ms) : 0, 230284
GlobalTracer [candidate] (231.071 ms) : 0, 231071
IAST [baseline] (28.122 ms) : 0, 28122
IAST [candidate] (28.136 ms) : 0, 28136
AppSec [baseline] (50.96 ms) : 0, 50960
AppSec [candidate] (51.024 ms) : 0, 51024
Debugger [baseline] (5.948 ms) : 0, 5948
Debugger [candidate] (5.943 ms) : 0, 5943
Remote Config [baseline] (591.162 µs) : 0, 591
Remote Config [candidate] (609.031 µs) : 0, 609
Telemetry [baseline] (7.761 ms) : 0, 7761
Telemetry [candidate] (7.781 ms) : 0, 7781
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.022 s) : 0, 1022413
Total [baseline] (11.043 s) : 0, 11043236
Agent [candidate] (1.025 s) : 0, 1025039
Total [candidate] (11.091 s) : 0, 11091327
section appsec
Agent [baseline] (1.173 s) : 0, 1172561
Total [baseline] (11.164 s) : 0, 11164347
Agent [candidate] (1.178 s) : 0, 1177505
Total [candidate] (11.193 s) : 0, 11193065
section iast
Agent [baseline] (1.148 s) : 0, 1147875
Total [baseline] (11.378 s) : 0, 11378150
Agent [candidate] (1.148 s) : 0, 1148190
Total [candidate] (11.297 s) : 0, 11297129
section profiling
Agent [baseline] (1.269 s) : 0, 1269374
Total [baseline] (11.407 s) : 0, 11406506
Agent [candidate] (1.266 s) : 0, 1265518
Total [candidate] (11.517 s) : 0, 11517141
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.14 ms) : 0, 682140
BytebuddyAgent [candidate] (683.339 ms) : 0, 683339
GlobalTracer [baseline] (239.852 ms) : 0, 239852
GlobalTracer [candidate] (240.796 ms) : 0, 240796
AppSec [baseline] (55.627 ms) : 0, 55627
AppSec [candidate] (57.808 ms) : 0, 57808
Debugger [baseline] (6.187 ms) : 0, 6187
Debugger [candidate] (6.144 ms) : 0, 6144
Remote Config [baseline] (722.205 µs) : 0, 722
Remote Config [candidate] (729.216 µs) : 0, 729
Telemetry [baseline] (14.356 ms) : 0, 14356
Telemetry [candidate] (12.715 ms) : 0, 12715
section appsec
BytebuddyAgent [baseline] (704.067 ms) : 0, 704067
BytebuddyAgent [candidate] (707.567 ms) : 0, 707567
GlobalTracer [baseline] (234.205 ms) : 0, 234205
GlobalTracer [candidate] (235.297 ms) : 0, 235297
AppSec [baseline] (174.908 ms) : 0, 174908
AppSec [candidate] (175.233 ms) : 0, 175233
Debugger [baseline] (5.927 ms) : 0, 5927
Debugger [candidate] (5.922 ms) : 0, 5922
Remote Config [baseline] (631.353 µs) : 0, 631
Remote Config [candidate] (614.473 µs) : 0, 614
Telemetry [baseline] (7.355 ms) : 0, 7355
Telemetry [candidate] (7.27 ms) : 0, 7270
IAST [baseline] (21.893 ms) : 0, 21893
IAST [candidate] (21.94 ms) : 0, 21940
section iast
BytebuddyAgent [baseline] (800.44 ms) : 0, 800440
BytebuddyAgent [candidate] (800.103 ms) : 0, 800103
GlobalTracer [baseline] (230.392 ms) : 0, 230392
GlobalTracer [candidate] (230.567 ms) : 0, 230567
AppSec [baseline] (49.174 ms) : 0, 49174
AppSec [candidate] (54.94 ms) : 0, 54940
Debugger [baseline] (5.9 ms) : 0, 5900
Debugger [candidate] (5.946 ms) : 0, 5946
Remote Config [baseline] (595.786 µs) : 0, 596
Remote Config [candidate] (589.518 µs) : 0, 590
Telemetry [baseline] (7.923 ms) : 0, 7923
Telemetry [candidate] (7.911 ms) : 0, 7911
IAST [baseline] (29.904 ms) : 0, 29904
IAST [candidate] (24.607 ms) : 0, 24607
section profiling
ProfilingAgent [baseline] (101.983 ms) : 0, 101983
ProfilingAgent [candidate] (102.635 ms) : 0, 102635
BytebuddyAgent [baseline] (679.118 ms) : 0, 679118
BytebuddyAgent [candidate] (675.914 ms) : 0, 675914
GlobalTracer [baseline] (361.345 ms) : 0, 361345
GlobalTracer [candidate] (359.923 ms) : 0, 359923
AppSec [baseline] (61.176 ms) : 0, 61176
AppSec [candidate] (61.526 ms) : 0, 61526
Debugger [baseline] (5.99 ms) : 0, 5990
Debugger [candidate] (6.044 ms) : 0, 6044
Remote Config [baseline] (642.915 µs) : 0, 643
Remote Config [candidate] (658.943 µs) : 0, 659
Telemetry [baseline] (8.018 ms) : 0, 8018
Telemetry [candidate] (8.117 ms) : 0, 8117
Profiling [baseline] (102.009 ms) : 0, 102009
Profiling [candidate] (102.659 ms) : 0, 102659
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 0 metrics, 6 unstable metrics.
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (2.405 ms) : 2357, 2454
. : milestone, 2405,
iast (2.196 ms) : 2135, 2257
. : milestone, 2196,
iast_GLOBAL (2.226 ms) : 2165, 2288
. : milestone, 2226,
profiling (2.029 ms) : 1980, 2078
. : milestone, 2029,
tracing (2.018 ms) : 1970, 2065
. : milestone, 2018,
section candidate
no_agent (1.481 ms) : 1469, 1492
. : milestone, 1481,
appsec (2.411 ms) : 2363, 2460
. : milestone, 2411,
iast (2.191 ms) : 2130, 2253
. : milestone, 2191,
iast_GLOBAL (2.235 ms) : 2174, 2296
. : milestone, 2235,
profiling (2.043 ms) : 1993, 2093
. : milestone, 2043,
tracing (2.012 ms) : 1965, 2059
. : milestone, 2012,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~581e03af9f, baseline=1.50.0-SNAPSHOT~2442b1fa6d
dateFormat X
axisFormat %s
section baseline
no_agent (15.68 s) : 15680000, 15680000
. : milestone, 15680000,
appsec (14.875 s) : 14875000, 14875000
. : milestone, 14875000,
iast (18.456 s) : 18456000, 18456000
. : milestone, 18456000,
iast_GLOBAL (18.046 s) : 18046000, 18046000
. : milestone, 18046000,
profiling (15.931 s) : 15931000, 15931000
. : milestone, 15931000,
tracing (14.917 s) : 14917000, 14917000
. : milestone, 14917000,
section candidate
no_agent (15.27 s) : 15270000, 15270000
. : milestone, 15270000,
appsec (14.519 s) : 14519000, 14519000
. : milestone, 14519000,
iast (18.802 s) : 18802000, 18802000
. : milestone, 18802000,
iast_GLOBAL (18.0 s) : 18000000, 18000000
. : milestone, 18000000,
profiling (15.837 s) : 15837000, 15837000
. : milestone, 15837000,
tracing (14.937 s) : 14937000, 14937000
. : milestone, 14937000,
|
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…
What Does This Do
Upgrade gradle to v8.14.2
Motivation
We want to add Java 24 testing through #8875 , and Java 24 support is introduced in gradle v8.14 (release notes).
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]