-
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 58 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.019 s) : 0, 1018659
Total [baseline] (8.538 s) : 0, 8537575
Agent [candidate] (1.027 s) : 0, 1027037
Total [candidate] (8.554 s) : 0, 8554399
section iast
Agent [baseline] (1.158 s) : 0, 1157564
Total [baseline] (9.214 s) : 0, 9213906
Agent [candidate] (1.158 s) : 0, 1158324
Total [candidate] (9.219 s) : 0, 9218524
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.151 s) : 0, 1151375
Total [baseline] (9.176 s) : 0, 9175628
Agent [candidate] (1.156 s) : 0, 1155692
Total [candidate] (9.185 s) : 0, 9184528
section iast_TELEMETRY_OFF
Agent [baseline] (1.151 s) : 0, 1150899
Total [baseline] (9.266 s) : 0, 9266181
Agent [candidate] (1.147 s) : 0, 1147423
Total [candidate] (9.2 s) : 0, 9200168
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (680.066 ms) : 0, 680066
BytebuddyAgent [candidate] (684.427 ms) : 0, 684427
GlobalTracer [baseline] (239.252 ms) : 0, 239252
GlobalTracer [candidate] (242.051 ms) : 0, 242051
AppSec [baseline] (55.735 ms) : 0, 55735
AppSec [candidate] (57.188 ms) : 0, 57188
Debugger [baseline] (6.175 ms) : 0, 6175
Debugger [candidate] (6.198 ms) : 0, 6198
Remote Config [baseline] (738.517 µs) : 0, 739
Remote Config [candidate] (737.986 µs) : 0, 738
Telemetry [baseline] (13.148 ms) : 0, 13148
Telemetry [candidate] (12.826 ms) : 0, 12826
section iast
BytebuddyAgent [baseline] (807.34 ms) : 0, 807340
BytebuddyAgent [candidate] (808.517 ms) : 0, 808517
GlobalTracer [baseline] (231.84 ms) : 0, 231840
GlobalTracer [candidate] (232.021 ms) : 0, 232021
IAST [baseline] (27.931 ms) : 0, 27931
IAST [candidate] (25.397 ms) : 0, 25397
AppSec [baseline] (52.108 ms) : 0, 52108
AppSec [candidate] (54.227 ms) : 0, 54227
Debugger [baseline] (6.089 ms) : 0, 6089
Debugger [candidate] (5.99 ms) : 0, 5990
Remote Config [baseline] (613.044 µs) : 0, 613
Remote Config [candidate] (620.459 µs) : 0, 620
Telemetry [baseline] (8.042 ms) : 0, 8042
Telemetry [candidate] (7.913 ms) : 0, 7913
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (802.301 ms) : 0, 802301
BytebuddyAgent [candidate] (804.865 ms) : 0, 804865
GlobalTracer [baseline] (230.605 ms) : 0, 230605
GlobalTracer [candidate] (233.491 ms) : 0, 233491
IAST [baseline] (25.831 ms) : 0, 25831
IAST [candidate] (27.055 ms) : 0, 27055
AppSec [baseline] (54.536 ms) : 0, 54536
AppSec [candidate] (51.947 ms) : 0, 51947
Debugger [baseline] (6.007 ms) : 0, 6007
Debugger [candidate] (5.987 ms) : 0, 5987
Remote Config [baseline] (599.536 µs) : 0, 600
Remote Config [candidate] (623.267 µs) : 0, 623
Telemetry [baseline] (7.934 ms) : 0, 7934
Telemetry [candidate] (8.075 ms) : 0, 8075
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (800.451 ms) : 0, 800451
BytebuddyAgent [candidate] (799.272 ms) : 0, 799272
GlobalTracer [baseline] (232.321 ms) : 0, 232321
GlobalTracer [candidate] (230.982 ms) : 0, 230982
IAST [baseline] (27.658 ms) : 0, 27658
IAST [candidate] (28.029 ms) : 0, 28029
AppSec [baseline] (52.368 ms) : 0, 52368
AppSec [candidate] (51.15 ms) : 0, 51150
Debugger [baseline] (6.071 ms) : 0, 6071
Debugger [candidate] (5.968 ms) : 0, 5968
Remote Config [baseline] (602.993 µs) : 0, 603
Remote Config [candidate] (599.948 µs) : 0, 600
Telemetry [baseline] (7.912 ms) : 0, 7912
Telemetry [candidate] (7.868 ms) : 0, 7868
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.023 s) : 0, 1022518
Total [baseline] (11.12 s) : 0, 11120470
Agent [candidate] (1.031 s) : 0, 1031306
Total [candidate] (11.18 s) : 0, 11180198
section appsec
Agent [baseline] (1.165 s) : 0, 1165234
Total [baseline] (11.273 s) : 0, 11273264
Agent [candidate] (1.169 s) : 0, 1169079
Total [candidate] (11.243 s) : 0, 11242742
section iast
Agent [baseline] (1.152 s) : 0, 1152381
Total [baseline] (11.494 s) : 0, 11493702
Agent [candidate] (1.149 s) : 0, 1149157
Total [candidate] (11.439 s) : 0, 11439412
section profiling
Agent [baseline] (1.264 s) : 0, 1264160
Total [baseline] (11.565 s) : 0, 11565174
Agent [candidate] (1.273 s) : 0, 1272886
Total [candidate] (11.466 s) : 0, 11465678
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.542 ms) : 0, 681542
BytebuddyAgent [candidate] (688.449 ms) : 0, 688449
GlobalTracer [baseline] (240.126 ms) : 0, 240126
GlobalTracer [candidate] (242.701 ms) : 0, 242701
AppSec [baseline] (56.798 ms) : 0, 56798
AppSec [candidate] (59.511 ms) : 0, 59511
Debugger [baseline] (6.127 ms) : 0, 6127
Debugger [candidate] (6.157 ms) : 0, 6157
Remote Config [baseline] (730.585 µs) : 0, 731
Remote Config [candidate] (733.22 µs) : 0, 733
Telemetry [baseline] (13.613 ms) : 0, 13613
Telemetry [candidate] (9.93 ms) : 0, 9930
section appsec
BytebuddyAgent [baseline] (701.586 ms) : 0, 701586
BytebuddyAgent [candidate] (705.802 ms) : 0, 705802
GlobalTracer [baseline] (238.146 ms) : 0, 238146
GlobalTracer [candidate] (237.837 ms) : 0, 237837
AppSec [baseline] (176.831 ms) : 0, 176831
AppSec [candidate] (176.844 ms) : 0, 176844
Debugger [baseline] (6.006 ms) : 0, 6006
Debugger [candidate] (5.955 ms) : 0, 5955
Remote Config [baseline] (650.822 µs) : 0, 651
Remote Config [candidate] (636.42 µs) : 0, 636
Telemetry [baseline] (7.418 ms) : 0, 7418
Telemetry [candidate] (7.344 ms) : 0, 7344
IAST [baseline] (21.865 ms) : 0, 21865
IAST [candidate] (21.758 ms) : 0, 21758
section iast
BytebuddyAgent [baseline] (803.237 ms) : 0, 803237
BytebuddyAgent [candidate] (800.096 ms) : 0, 800096
GlobalTracer [baseline] (231.252 ms) : 0, 231252
GlobalTracer [candidate] (230.756 ms) : 0, 230756
AppSec [baseline] (53.736 ms) : 0, 53736
AppSec [candidate] (54.667 ms) : 0, 54667
Debugger [baseline] (5.97 ms) : 0, 5970
Debugger [candidate] (5.983 ms) : 0, 5983
Remote Config [baseline] (602.584 µs) : 0, 603
Remote Config [candidate] (598.689 µs) : 0, 599
Telemetry [baseline] (7.922 ms) : 0, 7922
Telemetry [candidate] (7.925 ms) : 0, 7925
IAST [baseline] (26.057 ms) : 0, 26057
IAST [candidate] (25.618 ms) : 0, 25618
section profiling
BytebuddyAgent [baseline] (673.959 ms) : 0, 673959
BytebuddyAgent [candidate] (678.932 ms) : 0, 678932
GlobalTracer [baseline] (359.605 ms) : 0, 359605
GlobalTracer [candidate] (361.434 ms) : 0, 361434
AppSec [baseline] (61.707 ms) : 0, 61707
AppSec [candidate] (61.959 ms) : 0, 61959
Debugger [baseline] (6.118 ms) : 0, 6118
Debugger [candidate] (6.131 ms) : 0, 6131
Remote Config [baseline] (653.246 µs) : 0, 653
Remote Config [candidate] (653.183 µs) : 0, 653
Telemetry [baseline] (8.112 ms) : 0, 8112
Telemetry [candidate] (8.257 ms) : 0, 8257
ProfilingAgent [baseline] (103.344 ms) : 0, 103344
ProfilingAgent [candidate] (104.484 ms) : 0, 104484
Profiling [baseline] (103.369 ms) : 0, 103369
Profiling [candidate] (104.507 ms) : 0, 104507
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 6 performance regressions! Performance is the same for 0 metrics, 8 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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section baseline
no_agent (15.386 s) : 15386000, 15386000
. : milestone, 15386000,
appsec (15.126 s) : 15126000, 15126000
. : milestone, 15126000,
iast (18.546 s) : 18546000, 18546000
. : milestone, 18546000,
iast_GLOBAL (18.097 s) : 18097000, 18097000
. : milestone, 18097000,
profiling (15.336 s) : 15336000, 15336000
. : milestone, 15336000,
tracing (14.824 s) : 14824000, 14824000
. : milestone, 14824000,
section candidate
no_agent (15.531 s) : 15531000, 15531000
. : milestone, 15531000,
appsec (14.862 s) : 14862000, 14862000
. : milestone, 14862000,
iast (19.182 s) : 19182000, 19182000
. : milestone, 19182000,
iast_GLOBAL (18.006 s) : 18006000, 18006000
. : milestone, 18006000,
profiling (15.191 s) : 15191000, 15191000
. : milestone, 15191000,
tracing (14.598 s) : 14598000, 14598000
. : milestone, 14598000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~d8450d8823, baseline=1.50.0-SNAPSHOT~3853c65296
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1489
. : milestone, 1477,
appsec (2.399 ms) : 2350, 2448
. : milestone, 2399,
iast (2.186 ms) : 2125, 2248
. : milestone, 2186,
iast_GLOBAL (2.219 ms) : 2157, 2281
. : milestone, 2219,
profiling (2.027 ms) : 1978, 2076
. : milestone, 2027,
tracing (2.009 ms) : 1961, 2057
. : milestone, 2009,
section candidate
no_agent (1.477 ms) : 1465, 1489
. : milestone, 1477,
appsec (2.407 ms) : 2358, 2456
. : milestone, 2407,
iast (2.187 ms) : 2126, 2248
. : milestone, 2187,
iast_GLOBAL (2.227 ms) : 2166, 2289
. : milestone, 2227,
profiling (2.024 ms) : 1975, 2073
. : milestone, 2024,
tracing (2.008 ms) : 1961, 2056
. : milestone, 2008,
|
|
||
DefaultMetricPeriodicAction(@NonNull final MetricCollector<Metric> collector) { | ||
DefaultMetricPeriodicAction(@NonNull final MetricCollector<MetricCollector.Metric> 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.
Could you explain how this change related to upgrade to Gradle 8.14? and other similar changes in this PR.
If it is a code cleanup, I would recommend to create separate PR to make changes incremental and isolated.
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.
Yes! In short, I've just been addressing the errors I've seen after upgrading gradle, but I'll include explanations as well.
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.
Great!
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.
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]