Skip to content

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

sarahchen6
Copy link
Contributor

@sarahchen6 sarahchen6 commented Jun 9, 2025

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

Jira ticket: [PROJ-IDENT]

@pr-commenter
Copy link

pr-commenter bot commented Jun 9, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/upgrade-to-gradle-8.14
git_commit_date 1749673130 1749674371
git_commit_sha 2442b1f 581e03a
release_version 1.50.0-SNAPSHOT~2442b1fa6d 1.50.0-SNAPSHOT~581e03af9f
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1749677921 1749677921
ci_job_id 977542208 977542208
ci_pipeline_id 67464046 67464046
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-66eemyw1-project-304-concurrent-0-tb30eywb 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-66eemyw1-project-304-concurrent-0-tb30eywb 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 14 unstable metrics.

Startup time reports for insecure-bank
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.022 s -
Agent iast 1.147 s 125.56 ms (12.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.153 s 130.851 ms (12.8%)
Agent iast_TELEMETRY_OFF 1.143 s 121.211 ms (11.9%)
Total tracing 8.512 s -
Total iast 9.163 s 651.599 ms (7.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.133 s 621.527 ms (7.3%)
Total iast_TELEMETRY_OFF 9.221 s 708.732 ms (8.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.02 s -
Agent iast 1.156 s 136.177 ms (13.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.164 s 144.102 ms (14.1%)
Agent iast_TELEMETRY_OFF 1.145 s 125.197 ms (12.3%)
Total tracing 8.496 s -
Total iast 9.179 s 683.501 ms (8.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.175 s 679.072 ms (8.0%)
Total iast_TELEMETRY_OFF 9.219 s 723.672 ms (8.5%)
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
Loading
Startup time reports for petclinic
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.022 s -
Agent appsec 1.173 s 150.148 ms (14.7%)
Agent iast 1.148 s 125.462 ms (12.3%)
Agent profiling 1.269 s 246.961 ms (24.2%)
Total tracing 11.043 s -
Total appsec 11.164 s 121.111 ms (1.1%)
Total iast 11.378 s 334.914 ms (3.0%)
Total profiling 11.407 s 363.27 ms (3.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent appsec 1.178 s 152.466 ms (14.9%)
Agent iast 1.148 s 123.152 ms (12.0%)
Agent profiling 1.266 s 240.48 ms (23.5%)
Total tracing 11.091 s -
Total appsec 11.193 s 101.738 ms (0.9%)
Total iast 11.297 s 205.802 ms (1.9%)
Total profiling 11.517 s 425.814 ms (3.8%)
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
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-06-11T21:20:49 2025-06-11T21:25:40
git_branch master sarahchen6/upgrade-to-gradle-8.14
git_commit_date 1749673130 1749674371
git_commit_sha 2442b1f 581e03a
release_version 1.50.0-SNAPSHOT~2442b1fa6d 1.50.0-SNAPSHOT~581e03af9f
start_time 2025-06-11T21:20:43 2025-06-11T21:25:03
See matching parameters
Baseline Candidate
application petclinic petclinic
ci_job_date 1749677140 1749677140
ci_job_id 977542209 977542209
ci_pipeline_id 67464046 67464046
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-qrcmbjps-project-304-concurrent-0-wismj3lt 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-qrcmbjps-project-304-concurrent-0-wismj3lt 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
thresholds_or_results results results
variant appsec appsec

Summary

Found 0 performance improvements and 4 performance regressions! Performance is the same for 0 metrics, 6 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:petclinic:code_origins unstable
[+44.343ms; +47.784ms] or [+460.951%; +496.722%]
worse
[-451.626op/s; -416.576op/s] or [-87.914%; -81.091%]
55.684ms 79.615op/s 9.620ms 513.716op/s
scenario:load:petclinic:no_agent worse
[+17.393ms; +18.081ms] or [+199.910%; +207.818%]
unstable
[-412.152op/s; -350.909op/s] or [-72.642%; -61.848%]
26.437ms 185.845op/s 8.700ms 567.376op/s
scenario:load:petclinic:tracing worse
[+24.599ms; +25.461ms] or [+261.735%; +270.906%]
worse
[-410.365op/s; -359.727op/s] or [-77.969%; -68.348%]
34.428ms 141.270op/s 9.398ms 526.316op/s

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/upgrade-to-gradle-8.14
git_commit_date 1749673130 1749674371
git_commit_sha 2442b1f 581e03a
release_version 1.50.0-SNAPSHOT~2442b1fa6d 1.50.0-SNAPSHOT~581e03af9f
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1749677782 1749677782
ci_job_id 977542210 977542210
ci_pipeline_id 67464046 67464046
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-66eemyw1-project-304-concurrent-1-8iq2wkk0 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-66eemyw1-project-304-concurrent-1-8iq2wkk0 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for tomcat
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.463 ms, 1.486 ms] -
appsec 2.405 ms [2.357 ms, 2.454 ms] 930.543 µs (63.1%)
iast 2.196 ms [2.135 ms, 2.257 ms] 721.18 µs (48.9%)
iast_GLOBAL 2.226 ms [2.165 ms, 2.288 ms] 751.695 µs (51.0%)
profiling 2.029 ms [1.98 ms, 2.078 ms] 554.261 µs (37.6%)
tracing 2.018 ms [1.97 ms, 2.065 ms] 542.904 µs (36.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.469 ms, 1.492 ms] -
appsec 2.411 ms [2.363 ms, 2.46 ms] 930.711 µs (62.9%)
iast 2.191 ms [2.13 ms, 2.253 ms] 710.723 µs (48.0%)
iast_GLOBAL 2.235 ms [2.174 ms, 2.296 ms] 753.933 µs (50.9%)
profiling 2.043 ms [1.993 ms, 2.093 ms] 562.535 µs (38.0%)
tracing 2.012 ms [1.965 ms, 2.059 ms] 531.412 µs (35.9%)
Execution time for biojava
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.68 s [15.68 s, 15.68 s] -
appsec 14.875 s [14.875 s, 14.875 s] -805.0 ms (-5.1%)
iast 18.456 s [18.456 s, 18.456 s] 2.776 s (17.7%)
iast_GLOBAL 18.046 s [18.046 s, 18.046 s] 2.366 s (15.1%)
profiling 15.931 s [15.931 s, 15.931 s] 251.0 ms (1.6%)
tracing 14.917 s [14.917 s, 14.917 s] -763.0 ms (-4.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.27 s [15.27 s, 15.27 s] -
appsec 14.519 s [14.519 s, 14.519 s] -751.0 ms (-4.9%)
iast 18.802 s [18.802 s, 18.802 s] 3.532 s (23.1%)
iast_GLOBAL 18.0 s [18.0 s, 18.0 s] 2.73 s (17.9%)
profiling 15.837 s [15.837 s, 15.837 s] 567.0 ms (3.7%)
tracing 14.937 s [14.937 s, 14.937 s] -333.0 ms (-2.2%)

@sarahchen6 sarahchen6 changed the title Upgrade gradle to v8.14 Upgrade gradle to v8.14.2 Jun 10, 2025
@bric3
Copy link
Contributor

bric3 commented Jun 10, 2025

I believe the failure in gradle/java_no_deps.gradle can be fixed via

      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"
Copy link
Contributor Author

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)
Copy link
Contributor Author

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
Copy link
Contributor Author

@sarahchen6 sarahchen6 Jun 10, 2025

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))
}
}
Copy link
Contributor Author

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
Copy link
Contributor Author

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") {}
}
}
Copy link
Contributor Author

@sarahchen6 sarahchen6 Jun 10, 2025

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);
Copy link
Contributor Author

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"

Copy link
Contributor Author

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.

@bric3
Copy link
Contributor

bric3 commented Jun 11, 2025

You may want to merge latest master, there were fixes on the gradle daemon smoke tests, see #8955

Unsure about the muzzle ones.

@sarahchen6 sarahchen6 force-pushed the sarahchen6/upgrade-to-gradle-8.14 branch from d8450d8 to 0bb8eab Compare June 11, 2025 13:27
@@ -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()
}
Copy link
Contributor Author

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…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants