-
Notifications
You must be signed in to change notification settings - Fork 314
Convert ci_jobs.gradle to a convention plugin and extension
#9838
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
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.
I created a CIJobsExtensions.kt file separate from the datadog.ci-jobs.gradle.kts plugin file because these functions needed to available to the build.gradle.kts build script that applies the plugin itself. It also seemed like too much logic to include in the build.gradle.kts file directly. Let me know if a different organization method would be better (and any other thoughts of course)!
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.
I think this should land ins some package there, like datadog.ci.
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.
I included package datadog.ci now!
|
🎯 Code Coverage 🔗 Commit SHA: 6c60952 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.031 s) : 0, 1031415
Total [baseline] (8.649 s) : 0, 8649399
Agent [candidate] (1.03 s) : 0, 1030137
Total [candidate] (8.687 s) : 0, 8687462
section iast
Agent [baseline] (1.164 s) : 0, 1163643
Total [baseline] (9.327 s) : 0, 9326514
Agent [candidate] (1.161 s) : 0, 1161129
Total [candidate] (9.354 s) : 0, 9354466
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (703.031 ms) : 0, 703031
BytebuddyAgent [candidate] (702.545 ms) : 0, 702545
GlobalTracer [baseline] (245.2 ms) : 0, 245200
GlobalTracer [candidate] (244.462 ms) : 0, 244462
AppSec [baseline] (32.415 ms) : 0, 32415
AppSec [candidate] (32.317 ms) : 0, 32317
Debugger [baseline] (6.412 ms) : 0, 6412
Debugger [candidate] (6.353 ms) : 0, 6353
Remote Config [baseline] (680.159 µs) : 0, 680
Remote Config [candidate] (669.647 µs) : 0, 670
Telemetry [baseline] (13.735 ms) : 0, 13735
Telemetry [candidate] (16.807 ms) : 0, 16807
Flare Poller [baseline] (7.274 ms) : 0, 7274
Flare Poller [candidate] (4.254 ms) : 0, 4254
section iast
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.46 ms) : 0, 1460
BytebuddyAgent [baseline] (825.314 ms) : 0, 825314
BytebuddyAgent [candidate] (823.756 ms) : 0, 823756
GlobalTracer [baseline] (234.324 ms) : 0, 234324
GlobalTracer [candidate] (233.743 ms) : 0, 233743
AppSec [baseline] (30.626 ms) : 0, 30626
AppSec [candidate] (30.521 ms) : 0, 30521
Debugger [baseline] (6.175 ms) : 0, 6175
Debugger [candidate] (6.101 ms) : 0, 6101
Remote Config [baseline] (605.611 µs) : 0, 606
Remote Config [candidate] (605.354 µs) : 0, 605
Telemetry [baseline] (8.59 ms) : 0, 8590
Telemetry [candidate] (8.493 ms) : 0, 8493
Flare Poller [baseline] (4.177 ms) : 0, 4177
Flare Poller [candidate] (4.169 ms) : 0, 4169
IAST [baseline] (31.01 ms) : 0, 31010
IAST [candidate] (31.035 ms) : 0, 31035
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1032476
Total [baseline] (10.8 s) : 0, 10800181
Agent [candidate] (1.028 s) : 0, 1027954
Total [candidate] (10.802 s) : 0, 10801951
section appsec
Agent [baseline] (1.21 s) : 0, 1210322
Total [baseline] (10.975 s) : 0, 10974626
Agent [candidate] (1.201 s) : 0, 1200873
Total [candidate] (10.831 s) : 0, 10830971
section iast
Agent [baseline] (1.165 s) : 0, 1164691
Total [baseline] (11.086 s) : 0, 11085689
Agent [candidate] (1.157 s) : 0, 1157005
Total [candidate] (11.143 s) : 0, 11142742
section profiling
Agent [baseline] (1.18 s) : 0, 1180154
Total [baseline] (10.88 s) : 0, 10880021
Agent [candidate] (1.171 s) : 0, 1170920
Total [candidate] (10.852 s) : 0, 10852264
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (703.988 ms) : 0, 703988
BytebuddyAgent [candidate] (700.902 ms) : 0, 700902
GlobalTracer [baseline] (245.337 ms) : 0, 245337
GlobalTracer [candidate] (244.627 ms) : 0, 244627
AppSec [baseline] (32.388 ms) : 0, 32388
AppSec [candidate] (32.475 ms) : 0, 32475
Debugger [baseline] (6.404 ms) : 0, 6404
Debugger [candidate] (6.438 ms) : 0, 6438
Remote Config [baseline] (684.162 µs) : 0, 684
Remote Config [candidate] (679.276 µs) : 0, 679
Telemetry [baseline] (13.595 ms) : 0, 13595
Telemetry [candidate] (13.828 ms) : 0, 13828
Flare Poller [baseline] (7.339 ms) : 0, 7339
Flare Poller [candidate] (6.444 ms) : 0, 6444
section appsec
crashtracking [baseline] (1.478 ms) : 0, 1478
crashtracking [candidate] (1.482 ms) : 0, 1482
BytebuddyAgent [baseline] (730.912 ms) : 0, 730912
BytebuddyAgent [candidate] (725.241 ms) : 0, 725241
GlobalTracer [baseline] (237.556 ms) : 0, 237556
GlobalTracer [candidate] (235.17 ms) : 0, 235170
AppSec [baseline] (175.136 ms) : 0, 175136
AppSec [candidate] (173.975 ms) : 0, 173975
Debugger [baseline] (5.922 ms) : 0, 5922
Debugger [candidate] (5.899 ms) : 0, 5899
Remote Config [baseline] (646.115 µs) : 0, 646
Remote Config [candidate] (623.913 µs) : 0, 624
Telemetry [baseline] (8.452 ms) : 0, 8452
Telemetry [candidate] (8.377 ms) : 0, 8377
Flare Poller [baseline] (3.89 ms) : 0, 3890
Flare Poller [candidate] (3.865 ms) : 0, 3865
IAST [baseline] (25.074 ms) : 0, 25074
IAST [candidate] (25.103 ms) : 0, 25103
section iast
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.46 ms) : 0, 1460
BytebuddyAgent [baseline] (825.884 ms) : 0, 825884
BytebuddyAgent [candidate] (819.858 ms) : 0, 819858
GlobalTracer [baseline] (234.422 ms) : 0, 234422
GlobalTracer [candidate] (232.963 ms) : 0, 232963
AppSec [baseline] (32.592 ms) : 0, 32592
AppSec [candidate] (31.787 ms) : 0, 31787
Debugger [baseline] (6.127 ms) : 0, 6127
Debugger [candidate] (6.167 ms) : 0, 6167
Remote Config [baseline] (601.687 µs) : 0, 602
Remote Config [candidate] (606.559 µs) : 0, 607
Telemetry [baseline] (8.621 ms) : 0, 8621
Telemetry [candidate] (8.589 ms) : 0, 8589
Flare Poller [baseline] (4.238 ms) : 0, 4238
Flare Poller [candidate] (4.166 ms) : 0, 4166
IAST [baseline] (29.386 ms) : 0, 29386
IAST [candidate] (29.998 ms) : 0, 29998
section profiling
crashtracking [baseline] (1.465 ms) : 0, 1465
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (731.257 ms) : 0, 731257
BytebuddyAgent [candidate] (725.883 ms) : 0, 725883
GlobalTracer [baseline] (221.41 ms) : 0, 221410
GlobalTracer [candidate] (219.418 ms) : 0, 219418
AppSec [baseline] (32.542 ms) : 0, 32542
AppSec [candidate] (32.184 ms) : 0, 32184
Debugger [baseline] (9.883 ms) : 0, 9883
Debugger [candidate] (10.718 ms) : 0, 10718
Remote Config [baseline] (1.485 ms) : 0, 1485
Remote Config [candidate] (2.149 ms) : 0, 2149
Telemetry [baseline] (12.222 ms) : 0, 12222
Telemetry [candidate] (10.664 ms) : 0, 10664
Flare Poller [baseline] (4.175 ms) : 0, 4175
Flare Poller [candidate] (4.07 ms) : 0, 4070
ProfilingAgent [baseline] (110.155 ms) : 0, 110155
ProfilingAgent [candidate] (109.215 ms) : 0, 109215
Profiling [baseline] (110.772 ms) : 0, 110772
Profiling [candidate] (109.864 ms) : 0, 109864
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 4 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section baseline
no_agent (36.305 ms) : 36015, 36594
. : milestone, 36305,
appsec (49.435 ms) : 48973, 49896
. : milestone, 49435,
code_origins (43.634 ms) : 43267, 44002
. : milestone, 43634,
iast (45.055 ms) : 44659, 45452
. : milestone, 45055,
profiling (47.173 ms) : 46766, 47580
. : milestone, 47173,
tracing (44.619 ms) : 44257, 44981
. : milestone, 44619,
section candidate
no_agent (35.584 ms) : 35306, 35863
. : milestone, 35584,
appsec (47.68 ms) : 47262, 48099
. : milestone, 47680,
code_origins (44.805 ms) : 44426, 45184
. : milestone, 44805,
iast (44.873 ms) : 44484, 45262
. : milestone, 44873,
profiling (49.644 ms) : 49186, 50103
. : milestone, 49644,
tracing (43.478 ms) : 43114, 43843
. : milestone, 43478,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section baseline
no_agent (4.353 ms) : 4302, 4404
. : milestone, 4353,
iast (9.616 ms) : 9455, 9777
. : milestone, 9616,
iast_FULL (14.836 ms) : 14536, 15136
. : milestone, 14836,
iast_GLOBAL (10.512 ms) : 10325, 10698
. : milestone, 10512,
profiling (8.674 ms) : 8524, 8823
. : milestone, 8674,
tracing (7.857 ms) : 7736, 7977
. : milestone, 7857,
section candidate
no_agent (4.5 ms) : 4447, 4554
. : milestone, 4500,
iast (9.632 ms) : 9460, 9805
. : milestone, 9632,
iast_FULL (14.144 ms) : 13858, 14431
. : milestone, 14144,
iast_GLOBAL (10.711 ms) : 10505, 10916
. : milestone, 10711,
profiling (9.179 ms) : 9021, 9337
. : milestone, 9179,
tracing (8.482 ms) : 8347, 8617
. : milestone, 8482,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (3.628 ms) : 3414, 3841
. : milestone, 3628,
iast (2.205 ms) : 2142, 2268
. : milestone, 2205,
iast_GLOBAL (2.248 ms) : 2184, 2312
. : milestone, 2248,
profiling (2.501 ms) : 2329, 2673
. : milestone, 2501,
tracing (2.023 ms) : 1973, 2072
. : milestone, 2023,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.647 ms) : 3432, 3862
. : milestone, 3647,
iast (2.202 ms) : 2138, 2265
. : milestone, 2202,
iast_GLOBAL (2.24 ms) : 2176, 2303
. : milestone, 2240,
profiling (2.063 ms) : 2011, 2115
. : milestone, 2063,
tracing (2.011 ms) : 1962, 2060
. : milestone, 2011,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~02eefbae9d, baseline=1.55.0-SNAPSHOT~4c89f79741
dateFormat X
axisFormat %s
section baseline
no_agent (15.018 s) : 15018000, 15018000
. : milestone, 15018000,
appsec (14.918 s) : 14918000, 14918000
. : milestone, 14918000,
iast (18.516 s) : 18516000, 18516000
. : milestone, 18516000,
iast_GLOBAL (17.756 s) : 17756000, 17756000
. : milestone, 17756000,
profiling (15.735 s) : 15735000, 15735000
. : milestone, 15735000,
tracing (15.405 s) : 15405000, 15405000
. : milestone, 15405000,
section candidate
no_agent (15.533 s) : 15533000, 15533000
. : milestone, 15533000,
appsec (14.789 s) : 14789000, 14789000
. : milestone, 14789000,
iast (18.586 s) : 18586000, 18586000
. : milestone, 18586000,
iast_GLOBAL (17.918 s) : 17918000, 17918000
. : milestone, 17918000,
profiling (15.286 s) : 15286000, 15286000
. : milestone, 15286000,
tracing (15.353 s) : 15353000, 15353000
. : milestone, 15353000,
|
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.
I had a brief overview and this looks good !
Thanks for that.
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.
I think this should land ins some package there, like datadog.ci.
| excludePrefixes: List<String>, | ||
| forceCoverage: Boolean = false | ||
| ) { | ||
| fun createRootTask(rootTaskName: String, subProjTaskName: String) { |
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.
suggestion: I think might be a private "top-level" method ?
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.
I think I see what you mean... like separating createRootTask() to its own private method instead of being embedded in testAggregate()? Let me try this.
| val coverage = forceCoverage || rootProject.hasProperty("checkCoverage") | ||
| val proj = this@testAggregate | ||
| tasks.register(rootTaskName) { | ||
| proj.subprojects.forEach { subproject -> |
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.
thought: It's outside the scope of this PR, but I think this can be rewritten as a provider passed to the task.dependsOn
| val activePartition = p.extra.get("activePartition") as Boolean | ||
| activePartition && p.plugins.hasPlugin("java") && p.plugins.hasPlugin("muzzle") | ||
| } | ||
| dependsOn(muzzleSubprojects.map { p -> "${p.path}:muzzle" }) |
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.
thought: Outside the scope of this PR as well, there might be an opportunity to wrap this calculation to a provider as well.
46048af to
6c60952
Compare
What Does This Do
Replace
ci_jobs.gradlefile with a convention plugin and extension fileMotivation
We want to progressively replace our scripts with convention plugins where it makes sense to. Convention plugins are useful for reusability and encapsulation, among other things. With our extensive amount of modules, convention plugins will make it easier to maintain, reuse, and organize our build components.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]