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 8 commits into
base: master
Choose a base branch
from

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 1749573424 1749590726
git_commit_sha 3853c65 d8450d8
release_version 1.50.0-SNAPSHOT~3853c65296 1.50.0-SNAPSHOT~d8450d8823
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1749594188 1749594188
ci_job_id 976013398 976013398
ci_pipeline_id 67404446 67404446
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-2ousnmcz-project-304-concurrent-0-71ys8qyw 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-2ousnmcz-project-304-concurrent-0-71ys8qyw 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 58 metrics, 13 unstable metrics.

Startup time reports for insecure-bank
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.019 s -
Agent iast 1.158 s 138.905 ms (13.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.151 s 132.715 ms (13.0%)
Agent iast_TELEMETRY_OFF 1.151 s 132.24 ms (13.0%)
Total tracing 8.538 s -
Total iast 9.214 s 676.331 ms (7.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.176 s 638.053 ms (7.5%)
Total iast_TELEMETRY_OFF 9.266 s 728.605 ms (8.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent iast 1.158 s 131.287 ms (12.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.156 s 128.655 ms (12.5%)
Agent iast_TELEMETRY_OFF 1.147 s 120.386 ms (11.7%)
Total tracing 8.554 s -
Total iast 9.219 s 664.125 ms (7.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.185 s 630.129 ms (7.4%)
Total iast_TELEMETRY_OFF 9.2 s 645.769 ms (7.5%)
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
Loading
Startup time reports for petclinic
gantt
    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
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.023 s -
Agent appsec 1.165 s 142.716 ms (14.0%)
Agent iast 1.152 s 129.864 ms (12.7%)
Agent profiling 1.264 s 241.643 ms (23.6%)
Total tracing 11.12 s -
Total appsec 11.273 s 152.794 ms (1.4%)
Total iast 11.494 s 373.232 ms (3.4%)
Total profiling 11.565 s 444.704 ms (4.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.031 s -
Agent appsec 1.169 s 137.773 ms (13.4%)
Agent iast 1.149 s 117.851 ms (11.4%)
Agent profiling 1.273 s 241.581 ms (23.4%)
Total tracing 11.18 s -
Total appsec 11.243 s 62.545 ms (0.6%)
Total iast 11.439 s 259.214 ms (2.3%)
Total profiling 11.466 s 285.48 ms (2.6%)
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
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-06-10T22:01:59 2025-06-10T22:11:36
git_branch master sarahchen6/upgrade-to-gradle-8.14
git_commit_date 1749573424 1749590726
git_commit_sha 3853c65 d8450d8
release_version 1.50.0-SNAPSHOT~3853c65296 1.50.0-SNAPSHOT~d8450d8823
start_time 2025-06-10T22:01:48 2025-06-10T22:10:48
See matching parameters
Baseline Candidate
application petclinic petclinic
ci_job_date 1749593496 1749593496
ci_job_id 976013399 976013399
ci_pipeline_id 67404446 67404446
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-vso6uaiy 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-vso6uaiy 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 6 performance regressions! Performance is the same for 0 metrics, 8 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:appsec_no_iast unstable
[+54.410ms; +56.758ms] or [+654.881%; +683.136%]
worse
[-528.916op/s; -501.269op/s] or [-89.255%; -84.589%]
63.892ms 77.500op/s 8.308ms 592.593op/s
scenario:load:petclinic:code_origins unstable
[+60.147ms; +65.122ms] or [+635.298%; +687.846%]
worse
[-470.717op/s; -447.276op/s] or [-89.804%; -85.331%]
72.102ms 65.167op/s 9.468ms 524.163op/s
scenario:load:petclinic:iast unstable
[+61.689ms; +65.007ms] or [+754.974%; +795.580%]
worse
[-549.347op/s; -526.191op/s] or [-90.642%; -86.822%]
71.519ms 68.292op/s 8.171ms 606.061op/s
scenario:load:petclinic:no_agent unstable
[+24.028ms; +24.955ms] or [+303.431%; +315.145%]
worse
[-500.199op/s; -446.020op/s] or [-80.032%; -71.363%]
32.410ms 151.890op/s 7.919ms 625.000op/s
scenario:load:petclinic:profiling unstable
[+40.100ms; +41.495ms] or [+444.726%; +460.200%]
worse
[-468.169op/s; -429.099op/s] or [-85.441%; -78.311%]
49.815ms 99.311op/s 9.017ms 547.945op/s
scenario:load:petclinic:tracing unstable
[+33.462ms; +34.582ms] or [+418.623%; +432.632%]
worse
[-517.160op/s; -487.013op/s] or [-83.392%; -78.531%]
42.015ms 118.068op/s 7.993ms 620.155op/s

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master sarahchen6/upgrade-to-gradle-8.14
git_commit_date 1749573424 1749590726
git_commit_sha 3853c65 d8450d8
release_version 1.50.0-SNAPSHOT~3853c65296 1.50.0-SNAPSHOT~d8450d8823
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1749593687 1749593687
ci_job_id 976013400 976013400
ci_pipeline_id 67404446 67404446
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-knhbfpzp 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-knhbfpzp 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 biojava
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.386 s [15.386 s, 15.386 s] -
appsec 15.126 s [15.126 s, 15.126 s] -260.0 ms (-1.7%)
iast 18.546 s [18.546 s, 18.546 s] 3.16 s (20.5%)
iast_GLOBAL 18.097 s [18.097 s, 18.097 s] 2.711 s (17.6%)
profiling 15.336 s [15.336 s, 15.336 s] -50.0 ms (-0.3%)
tracing 14.824 s [14.824 s, 14.824 s] -562.0 ms (-3.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.531 s [15.531 s, 15.531 s] -
appsec 14.862 s [14.862 s, 14.862 s] -669.0 ms (-4.3%)
iast 19.182 s [19.182 s, 19.182 s] 3.651 s (23.5%)
iast_GLOBAL 18.006 s [18.006 s, 18.006 s] 2.475 s (15.9%)
profiling 15.191 s [15.191 s, 15.191 s] -340.0 ms (-2.2%)
tracing 14.598 s [14.598 s, 14.598 s] -933.0 ms (-6.0%)
Execution time for tomcat
gantt
    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,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.477 ms [1.465 ms, 1.489 ms] -
appsec 2.399 ms [2.35 ms, 2.448 ms] 922.014 µs (62.4%)
iast 2.186 ms [2.125 ms, 2.248 ms] 709.474 µs (48.0%)
iast_GLOBAL 2.219 ms [2.157 ms, 2.281 ms] 741.968 µs (50.2%)
profiling 2.027 ms [1.978 ms, 2.076 ms] 549.901 µs (37.2%)
tracing 2.009 ms [1.961 ms, 2.057 ms] 531.836 µs (36.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.477 ms [1.465 ms, 1.489 ms] -
appsec 2.407 ms [2.358 ms, 2.456 ms] 930.12 µs (63.0%)
iast 2.187 ms [2.126 ms, 2.248 ms] 710.099 µs (48.1%)
iast_GLOBAL 2.227 ms [2.166 ms, 2.289 ms] 750.539 µs (50.8%)
profiling 2.024 ms [1.975 ms, 2.073 ms] 546.754 µs (37.0%)
tracing 2.008 ms [1.961 ms, 2.056 ms] 531.175 µs (36.0%)


DefaultMetricPeriodicAction(@NonNull final MetricCollector<Metric> collector) {
DefaultMetricPeriodicAction(@NonNull final MetricCollector<MetricCollector.Metric> collector) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great!

@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.

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