Add substituteVersion to muzzle directives to work around broken upstream POMs.#10777
Add substituteVersion to muzzle directives to work around broken upstream POMs.#10777AlexeyKuznetsov-DD wants to merge 2 commits intomasterfrom
substituteVersion to muzzle directives to work around broken upstream POMs.#10777Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.071 s) : 0, 1070692
Total [baseline] (8.859 s) : 0, 8859176
Agent [candidate] (1.06 s) : 0, 1060491
Total [candidate] (8.804 s) : 0, 8804263
section iast
Agent [baseline] (1.234 s) : 0, 1233652
Total [baseline] (9.532 s) : 0, 9532126
Agent [candidate] (1.228 s) : 0, 1228109
Total [candidate] (9.568 s) : 0, 9568210
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.237 ms) : 0, 1237
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (637.714 ms) : 0, 637714
BytebuddyAgent [candidate] (628.871 ms) : 0, 628871
AgentMeter [baseline] (29.532 ms) : 0, 29532
AgentMeter [candidate] (29.153 ms) : 0, 29153
GlobalTracer [baseline] (259.018 ms) : 0, 259018
GlobalTracer [candidate] (257.011 ms) : 0, 257011
AppSec [baseline] (31.819 ms) : 0, 31819
AppSec [candidate] (31.651 ms) : 0, 31651
Debugger [baseline] (59.166 ms) : 0, 59166
Debugger [candidate] (58.71 ms) : 0, 58710
Remote Config [baseline] (597.455 µs) : 0, 597
Remote Config [candidate] (585.403 µs) : 0, 585
Telemetry [baseline] (8.825 ms) : 0, 8825
Telemetry [candidate] (8.651 ms) : 0, 8651
Flare Poller [baseline] (6.495 ms) : 0, 6495
Flare Poller [candidate] (8.606 ms) : 0, 8606
section iast
crashtracking [baseline] (1.199 ms) : 0, 1199
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (800.849 ms) : 0, 800849
BytebuddyAgent [candidate] (797.461 ms) : 0, 797461
AgentMeter [baseline] (11.531 ms) : 0, 11531
AgentMeter [candidate] (11.318 ms) : 0, 11318
GlobalTracer [baseline] (248.294 ms) : 0, 248294
GlobalTracer [candidate] (247.813 ms) : 0, 247813
IAST [baseline] (25.359 ms) : 0, 25359
IAST [candidate] (25.149 ms) : 0, 25149
AppSec [baseline] (26.672 ms) : 0, 26672
AppSec [candidate] (27.266 ms) : 0, 27266
Debugger [baseline] (63.234 ms) : 0, 63234
Debugger [candidate] (61.562 ms) : 0, 61562
Remote Config [baseline] (551.567 µs) : 0, 552
Remote Config [candidate] (545.509 µs) : 0, 546
Telemetry [baseline] (14.853 ms) : 0, 14853
Telemetry [candidate] (15.077 ms) : 0, 15077
Flare Poller [baseline] (4.9 ms) : 0, 4900
Flare Poller [candidate] (4.638 ms) : 0, 4638
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066303
Total [baseline] (11.03 s) : 0, 11029796
Agent [candidate] (1.058 s) : 0, 1057978
Total [candidate] (11.026 s) : 0, 11026154
section appsec
Agent [baseline] (1.247 s) : 0, 1247245
Total [baseline] (11.091 s) : 0, 11091462
Agent [candidate] (1.245 s) : 0, 1245238
Total [candidate] (11.2 s) : 0, 11199800
section iast
Agent [baseline] (1.23 s) : 0, 1229650
Total [baseline] (11.401 s) : 0, 11400712
Agent [candidate] (1.226 s) : 0, 1225889
Total [candidate] (11.308 s) : 0, 11308447
section profiling
Agent [baseline] (1.182 s) : 0, 1182374
Total [baseline] (10.99 s) : 0, 10990091
Agent [candidate] (1.187 s) : 0, 1186925
Total [candidate] (11.112 s) : 0, 11111819
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.179 ms) : 0, 1179
BytebuddyAgent [baseline] (633.409 ms) : 0, 633409
BytebuddyAgent [candidate] (628.83 ms) : 0, 628830
AgentMeter [baseline] (29.191 ms) : 0, 29191
AgentMeter [candidate] (29.127 ms) : 0, 29127
GlobalTracer [baseline] (257.657 ms) : 0, 257657
GlobalTracer [candidate] (256.881 ms) : 0, 256881
AppSec [baseline] (31.679 ms) : 0, 31679
AppSec [candidate] (31.532 ms) : 0, 31532
Debugger [baseline] (59.64 ms) : 0, 59640
Debugger [candidate] (59.37 ms) : 0, 59370
Remote Config [baseline] (603.635 µs) : 0, 604
Remote Config [candidate] (598.281 µs) : 0, 598
Telemetry [baseline] (8.783 ms) : 0, 8783
Telemetry [candidate] (8.632 ms) : 0, 8632
Flare Poller [baseline] (8.051 ms) : 0, 8051
Flare Poller [candidate] (5.748 ms) : 0, 5748
section appsec
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.185 ms) : 0, 1185
BytebuddyAgent [baseline] (658.494 ms) : 0, 658494
BytebuddyAgent [candidate] (658.347 ms) : 0, 658347
AgentMeter [baseline] (11.998 ms) : 0, 11998
AgentMeter [candidate] (12.013 ms) : 0, 12013
GlobalTracer [baseline] (258.548 ms) : 0, 258548
GlobalTracer [candidate] (257.732 ms) : 0, 257732
IAST [baseline] (23.995 ms) : 0, 23995
IAST [candidate] (23.884 ms) : 0, 23884
AppSec [baseline] (177.758 ms) : 0, 177758
AppSec [candidate] (176.929 ms) : 0, 176929
Debugger [baseline] (65.782 ms) : 0, 65782
Debugger [candidate] (64.855 ms) : 0, 64855
Remote Config [baseline] (580.949 µs) : 0, 581
Remote Config [candidate] (583.562 µs) : 0, 584
Telemetry [baseline] (9.0 ms) : 0, 9000
Telemetry [candidate] (9.873 ms) : 0, 9873
Flare Poller [baseline] (3.587 ms) : 0, 3587
Flare Poller [candidate] (3.611 ms) : 0, 3611
section iast
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (796.402 ms) : 0, 796402
BytebuddyAgent [candidate] (794.528 ms) : 0, 794528
AgentMeter [baseline] (11.277 ms) : 0, 11277
AgentMeter [candidate] (11.321 ms) : 0, 11321
GlobalTracer [baseline] (247.632 ms) : 0, 247632
GlobalTracer [candidate] (247.081 ms) : 0, 247081
IAST [baseline] (25.369 ms) : 0, 25369
IAST [candidate] (25.156 ms) : 0, 25156
AppSec [baseline] (26.615 ms) : 0, 26615
AppSec [candidate] (27.25 ms) : 0, 27250
Debugger [baseline] (64.369 ms) : 0, 64369
Debugger [candidate] (63.067 ms) : 0, 63067
Remote Config [baseline] (534.478 µs) : 0, 534
Remote Config [candidate] (536.443 µs) : 0, 536
Telemetry [baseline] (15.097 ms) : 0, 15097
Telemetry [candidate] (14.867 ms) : 0, 14867
Flare Poller [baseline] (4.994 ms) : 0, 4994
Flare Poller [candidate] (4.923 ms) : 0, 4923
section profiling
crashtracking [baseline] (1.167 ms) : 0, 1167
crashtracking [candidate] (1.174 ms) : 0, 1174
BytebuddyAgent [baseline] (682.891 ms) : 0, 682891
BytebuddyAgent [candidate] (683.84 ms) : 0, 683840
AgentMeter [baseline] (8.635 ms) : 0, 8635
AgentMeter [candidate] (8.628 ms) : 0, 8628
GlobalTracer [baseline] (215.282 ms) : 0, 215282
GlobalTracer [candidate] (216.521 ms) : 0, 216521
AppSec [baseline] (31.902 ms) : 0, 31902
AppSec [candidate] (32.233 ms) : 0, 32233
Debugger [baseline] (63.818 ms) : 0, 63818
Debugger [candidate] (65.002 ms) : 0, 65002
Remote Config [baseline] (599.493 µs) : 0, 599
Remote Config [candidate] (589.508 µs) : 0, 590
Telemetry [baseline] (9.007 ms) : 0, 9007
Telemetry [candidate] (9.051 ms) : 0, 9051
Flare Poller [baseline] (4.283 ms) : 0, 4283
Flare Poller [candidate] (3.591 ms) : 0, 3591
ProfilingAgent [baseline] (93.941 ms) : 0, 93941
ProfilingAgent [candidate] (95.044 ms) : 0, 95044
Profiling [baseline] (94.507 ms) : 0, 94507
Profiling [candidate] (95.615 ms) : 0, 95615
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 1 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section baseline
no_agent (18.825 ms) : 18636, 19014
. : milestone, 18825,
appsec (19.331 ms) : 19131, 19530
. : milestone, 19331,
code_origins (17.836 ms) : 17661, 18012
. : milestone, 17836,
iast (17.54 ms) : 17366, 17714
. : milestone, 17540,
profiling (18.444 ms) : 18264, 18624
. : milestone, 18444,
tracing (17.731 ms) : 17553, 17910
. : milestone, 17731,
section candidate
no_agent (17.111 ms) : 16936, 17285
. : milestone, 17111,
appsec (19.935 ms) : 19729, 20142
. : milestone, 19935,
code_origins (18.571 ms) : 18383, 18758
. : milestone, 18571,
iast (17.799 ms) : 17622, 17975
. : milestone, 17799,
profiling (18.755 ms) : 18563, 18946
. : milestone, 18755,
tracing (18.183 ms) : 18000, 18366
. : milestone, 18183,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section baseline
no_agent (1.178 ms) : 1167, 1190
. : milestone, 1178,
iast (3.278 ms) : 3240, 3317
. : milestone, 3278,
iast_FULL (5.897 ms) : 5837, 5956
. : milestone, 5897,
iast_GLOBAL (3.393 ms) : 3337, 3449
. : milestone, 3393,
profiling (2.005 ms) : 1988, 2023
. : milestone, 2005,
tracing (1.776 ms) : 1762, 1790
. : milestone, 1776,
section candidate
no_agent (1.196 ms) : 1184, 1208
. : milestone, 1196,
iast (3.176 ms) : 3132, 3220
. : milestone, 3176,
iast_FULL (5.792 ms) : 5732, 5851
. : milestone, 5792,
iast_GLOBAL (3.64 ms) : 3580, 3700
. : milestone, 3640,
profiling (2.058 ms) : 2038, 2078
. : milestone, 2058,
tracing (1.836 ms) : 1820, 1852
. : milestone, 1836,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section baseline
no_agent (15.075 s) : 15075000, 15075000
. : milestone, 15075000,
appsec (14.71 s) : 14710000, 14710000
. : milestone, 14710000,
iast (17.889 s) : 17889000, 17889000
. : milestone, 17889000,
iast_GLOBAL (17.607 s) : 17607000, 17607000
. : milestone, 17607000,
profiling (15.049 s) : 15049000, 15049000
. : milestone, 15049000,
tracing (15.058 s) : 15058000, 15058000
. : milestone, 15058000,
section candidate
no_agent (15.325 s) : 15325000, 15325000
. : milestone, 15325000,
appsec (14.824 s) : 14824000, 14824000
. : milestone, 14824000,
iast (18.077 s) : 18077000, 18077000
. : milestone, 18077000,
iast_GLOBAL (17.582 s) : 17582000, 17582000
. : milestone, 17582000,
profiling (14.817 s) : 14817000, 14817000
. : milestone, 14817000,
tracing (15.408 s) : 15408000, 15408000
. : milestone, 15408000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~23240d2cb3, baseline=1.61.0-SNAPSHOT~b77fdabf42
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (2.587 ms) : 2528, 2645
. : milestone, 2587,
iast (2.268 ms) : 2199, 2337
. : milestone, 2268,
iast_GLOBAL (2.316 ms) : 2246, 2386
. : milestone, 2316,
profiling (2.11 ms) : 2053, 2166
. : milestone, 2110,
tracing (2.067 ms) : 2013, 2121
. : milestone, 2067,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (2.527 ms) : 2473, 2582
. : milestone, 2527,
iast (2.276 ms) : 2207, 2345
. : milestone, 2276,
iast_GLOBAL (2.313 ms) : 2243, 2383
. : milestone, 2313,
profiling (2.532 ms) : 2367, 2698
. : milestone, 2532,
tracing (2.084 ms) : 2030, 2137
. : milestone, 2084,
|
| // ship a broken jetty.version=9.4.59 property, referencing a Jetty BOM that does not exist. | ||
| // Substitute with the closest real release. | ||
| // Remove once Confluent publishes a fixed common-parent POM. | ||
| substituteVersion "org.eclipse.jetty:jetty-bom:9.4.59", "org.eclipse.jetty:jetty-bom:9.4.58.v20250814" |
There was a problem hiding this comment.
IMHO this complexify a bit the muzzle usage. Can we just skip that version?
bric3
left a comment
There was a problem hiding this comment.
Muzzle checks look into dependencies for class elements criteria. It doesn't need to have a valid classpath for compilation or runtime execution.
For this problem on kafka-schema-registry-client and jetty, I believe this should be fixed by excluding the dependency (it a method call excludeDependency("...")).
What Does This Do
Adds a
substituteVersiondirective tomuzzlethat replaces an exact dependency coordinate with another during Gradle resolution. Both the requested and target coordinates must be in group:module:version form. Multiplesubstitutions can be declared per directive.
Under the hood, the support layer:
<version>tag so the graph resolves cleanly).resolutionStrategy.eachDependencyrule that redirects the actual artifact download to the real target version.Applies the new directive to
confluent-schema-registry-4.1to work around a brokencommon-parent-7.5.13.pompublished by Confluent, which referencesjetty.version=9.4.59— a jetty-bom version that does not exist — causing muzzleresolution to fail for all Confluent versions covered by that parent.
Motivation
https://packages.confluent.io/maven/io/confluent/common-parent/7.5.13/common-parent-7.5.13.pom (and several surrounding releases) shipped with
<jetty.version>9.4.59</jetty.version>, whereorg.eclipse.jetty:jetty-bom:9.4.59doesnot exist. This caused muzzle to fail with a resolution error for every Confluent version that inherits from this parent POM, blocking CI.
The workaround substitutes
org.eclipse.jetty:jetty-bom:9.4.59→org.eclipse.jetty:jetty-bom:9.4.58.v20250814, the closest real release, which is API-compatible.Additional Notes
substituteVersionworkaround inconfluent-schema-registry-4.1/build.gradleshould be removed once Confluent publishes a fixed common-parent POM.resolutionStrategyrules apply to artifact downloads — so a missing POM causes a graph resolution failure even if a redirect rule is in place.Found root cause and opened issue for confluent: confluentinc/kafka-connect-storage-common#468