-
Notifications
You must be signed in to change notification settings - Fork 312
Replace shipkit-auto-version
by custom version plugin
#9228
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
Conversation
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1042716
Total [baseline] (8.618 s) : 0, 8617700
Agent [candidate] (1.041 s) : 0, 1041324
Total [candidate] (8.574 s) : 0, 8574256
section iast
Agent [baseline] (1.19 s) : 0, 1190255
Total [baseline] (9.366 s) : 0, 9365617
Agent [candidate] (1.171 s) : 0, 1171092
Total [candidate] (9.327 s) : 0, 9326686
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.423 ms) : 0, 1423
BytebuddyAgent [baseline] (728.541 ms) : 0, 728541
BytebuddyAgent [candidate] (728.227 ms) : 0, 728227
GlobalTracer [baseline] (242.218 ms) : 0, 242218
GlobalTracer [candidate] (241.581 ms) : 0, 241581
AppSec [baseline] (30.246 ms) : 0, 30246
AppSec [candidate] (29.881 ms) : 0, 29881
Debugger [baseline] (6.071 ms) : 0, 6071
Debugger [candidate] (6.017 ms) : 0, 6017
Remote Config [baseline] (654.89 µs) : 0, 655
Remote Config [candidate] (649.805 µs) : 0, 650
Telemetry [baseline] (12.661 ms) : 0, 12661
Telemetry [candidate] (12.554 ms) : 0, 12554
section iast
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.429 ms) : 0, 1429
BytebuddyAgent [baseline] (861.552 ms) : 0, 861552
BytebuddyAgent [candidate] (845.785 ms) : 0, 845785
GlobalTracer [baseline] (233.726 ms) : 0, 233726
GlobalTracer [candidate] (230.711 ms) : 0, 230711
IAST [baseline] (27.678 ms) : 0, 27678
IAST [candidate] (28.074 ms) : 0, 28074
AppSec [baseline] (28.151 ms) : 0, 28151
AppSec [candidate] (27.832 ms) : 0, 27832
Debugger [baseline] (7.599 ms) : 0, 7599
Debugger [candidate] (7.59 ms) : 0, 7590
Remote Config [baseline] (598.752 µs) : 0, 599
Remote Config [candidate] (600.797 µs) : 0, 601
Telemetry [baseline] (8.243 ms) : 0, 8243
Telemetry [candidate] (8.055 ms) : 0, 8055
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1044170
Total [baseline] (10.786 s) : 0, 10786177
Agent [candidate] (1.043 s) : 0, 1042793
Total [candidate] (10.665 s) : 0, 10665334
section appsec
Agent [baseline] (1.221 s) : 0, 1221422
Total [baseline] (10.758 s) : 0, 10758237
Agent [candidate] (1.221 s) : 0, 1221191
Total [candidate] (10.732 s) : 0, 10731643
section iast
Agent [baseline] (1.181 s) : 0, 1180547
Total [baseline] (11.009 s) : 0, 11009020
Agent [candidate] (1.192 s) : 0, 1191777
Total [candidate] (10.978 s) : 0, 10978458
section profiling
Agent [baseline] (1.191 s) : 0, 1191156
Total [baseline] (10.888 s) : 0, 10888079
Agent [candidate] (1.192 s) : 0, 1191652
Total [candidate] (10.872 s) : 0, 10872167
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.43 ms) : 0, 1430
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (732.224 ms) : 0, 732224
BytebuddyAgent [candidate] (730.629 ms) : 0, 730629
GlobalTracer [baseline] (241.29 ms) : 0, 241290
GlobalTracer [candidate] (241.291 ms) : 0, 241291
AppSec [baseline] (30.161 ms) : 0, 30161
AppSec [candidate] (29.872 ms) : 0, 29872
Debugger [baseline] (6.065 ms) : 0, 6065
Debugger [candidate] (6.049 ms) : 0, 6049
Remote Config [baseline] (653.711 µs) : 0, 654
Remote Config [candidate] (650.512 µs) : 0, 651
Telemetry [baseline] (11.257 ms) : 0, 11257
Telemetry [candidate] (11.162 ms) : 0, 11162
section appsec
crashtracking [baseline] (1.435 ms) : 0, 1435
crashtracking [candidate] (1.444 ms) : 0, 1444
BytebuddyAgent [baseline] (754.681 ms) : 0, 754681
BytebuddyAgent [candidate] (753.763 ms) : 0, 753763
GlobalTracer [baseline] (235.13 ms) : 0, 235130
GlobalTracer [candidate] (235.373 ms) : 0, 235373
IAST [baseline] (23.734 ms) : 0, 23734
IAST [candidate] (23.675 ms) : 0, 23675
AppSec [baseline] (168.748 ms) : 0, 168748
AppSec [candidate] (169.803 ms) : 0, 169803
Debugger [baseline] (7.806 ms) : 0, 7806
Debugger [candidate] (7.224 ms) : 0, 7224
Remote Config [baseline] (606.189 µs) : 0, 606
Remote Config [candidate] (609.911 µs) : 0, 610
Telemetry [baseline] (8.204 ms) : 0, 8204
Telemetry [candidate] (8.217 ms) : 0, 8217
section iast
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (853.311 ms) : 0, 853311
BytebuddyAgent [candidate] (861.188 ms) : 0, 861188
GlobalTracer [baseline] (231.854 ms) : 0, 231854
GlobalTracer [candidate] (233.998 ms) : 0, 233998
IAST [baseline] (29.402 ms) : 0, 29402
IAST [candidate] (26.562 ms) : 0, 26562
AppSec [baseline] (27.927 ms) : 0, 27927
AppSec [candidate] (30.762 ms) : 0, 30762
Debugger [baseline] (6.661 ms) : 0, 6661
Debugger [candidate] (7.528 ms) : 0, 7528
Remote Config [baseline] (597.448 µs) : 0, 597
Remote Config [candidate] (606.231 µs) : 0, 606
Telemetry [baseline] (8.196 ms) : 0, 8196
Telemetry [candidate] (8.3 ms) : 0, 8300
section profiling
crashtracking [baseline] (1.407 ms) : 0, 1407
crashtracking [candidate] (1.402 ms) : 0, 1402
BytebuddyAgent [baseline] (759.147 ms) : 0, 759147
BytebuddyAgent [candidate] (759.274 ms) : 0, 759274
GlobalTracer [baseline] (220.678 ms) : 0, 220678
GlobalTracer [candidate] (220.978 ms) : 0, 220978
AppSec [baseline] (29.852 ms) : 0, 29852
AppSec [candidate] (29.871 ms) : 0, 29871
Debugger [baseline] (6.215 ms) : 0, 6215
Debugger [candidate] (6.324 ms) : 0, 6324
Remote Config [baseline] (693.44 µs) : 0, 693
Remote Config [candidate] (660.353 µs) : 0, 660
Telemetry [baseline] (16.057 ms) : 0, 16057
Telemetry [candidate] (16.021 ms) : 0, 16021
ProfilingAgent [baseline] (107.678 ms) : 0, 107678
ProfilingAgent [candidate] (107.822 ms) : 0, 107822
Profiling [baseline] (108.316 ms) : 0, 108316
Profiling [candidate] (108.481 ms) : 0, 108481
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section baseline
no_agent (35.575 ms) : 35289, 35861
. : milestone, 35575,
appsec (46.994 ms) : 46563, 47426
. : milestone, 46994,
code_origins (44.639 ms) : 44260, 45018
. : milestone, 44639,
iast (44.697 ms) : 44307, 45088
. : milestone, 44697,
profiling (48.139 ms) : 47663, 48615
. : milestone, 48139,
tracing (44.185 ms) : 43809, 44561
. : milestone, 44185,
section candidate
no_agent (36.637 ms) : 36337, 36937
. : milestone, 36637,
appsec (47.044 ms) : 46621, 47466
. : milestone, 47044,
code_origins (44.97 ms) : 44585, 45355
. : milestone, 44970,
iast (45.31 ms) : 44923, 45697
. : milestone, 45310,
profiling (48.499 ms) : 48058, 48941
. : milestone, 48499,
tracing (43.536 ms) : 43169, 43903
. : milestone, 43536,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section baseline
no_agent (4.532 ms) : 4478, 4586
. : milestone, 4532,
iast (9.525 ms) : 9360, 9690
. : milestone, 9525,
iast_FULL (14.24 ms) : 13959, 14521
. : milestone, 14240,
iast_GLOBAL (10.284 ms) : 10106, 10463
. : milestone, 10284,
profiling (8.663 ms) : 8523, 8804
. : milestone, 8663,
tracing (7.593 ms) : 7485, 7701
. : milestone, 7593,
section candidate
no_agent (4.404 ms) : 4356, 4453
. : milestone, 4404,
iast (9.051 ms) : 8905, 9197
. : milestone, 9051,
iast_FULL (14.627 ms) : 14332, 14923
. : milestone, 14627,
iast_GLOBAL (10.029 ms) : 9840, 10218
. : milestone, 10029,
profiling (9.013 ms) : 8863, 9163
. : milestone, 9013,
tracing (7.768 ms) : 7648, 7887
. : milestone, 7768,
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.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (3.663 ms) : 3448, 3879
. : milestone, 3663,
iast (2.196 ms) : 2133, 2258
. : milestone, 2196,
iast_GLOBAL (2.237 ms) : 2174, 2300
. : milestone, 2237,
profiling (2.475 ms) : 2310, 2640
. : milestone, 2475,
tracing (2.011 ms) : 1962, 2059
. : milestone, 2011,
section candidate
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (3.574 ms) : 3363, 3784
. : milestone, 3574,
iast (2.203 ms) : 2141, 2266
. : milestone, 2203,
iast_GLOBAL (2.239 ms) : 2176, 2302
. : milestone, 2239,
profiling (2.062 ms) : 2010, 2113
. : milestone, 2062,
tracing (2.027 ms) : 1978, 2076
. : milestone, 2027,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~fa7617cfc5, baseline=1.51.1-SNAPSHOT~023e5251a6
dateFormat X
axisFormat %s
section baseline
no_agent (15.06 s) : 15060000, 15060000
. : milestone, 15060000,
appsec (14.879 s) : 14879000, 14879000
. : milestone, 14879000,
iast (18.523 s) : 18523000, 18523000
. : milestone, 18523000,
iast_GLOBAL (17.904 s) : 17904000, 17904000
. : milestone, 17904000,
profiling (15.456 s) : 15456000, 15456000
. : milestone, 15456000,
tracing (15.039 s) : 15039000, 15039000
. : milestone, 15039000,
section candidate
no_agent (14.943 s) : 14943000, 14943000
. : milestone, 14943000,
appsec (14.835 s) : 14835000, 14835000
. : milestone, 14835000,
iast (18.852 s) : 18852000, 18852000
. : milestone, 18852000,
iast_GLOBAL (18.089 s) : 18089000, 18089000
. : milestone, 18089000,
profiling (15.309 s) : 15309000, 15309000
. : milestone, 15309000,
tracing (14.85 s) : 14850000, 14850000
. : milestone, 14850000,
|
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.
Quick review. Happy to have another pair of eyes on it.
A quick question remains: can we test it in some way? 🤷
No pushing hard for testing, but interested to know if there would be a way 🤔
"--abbrev=8", | ||
"--tags", | ||
"--first-parent", | ||
"--match=$tagPrefix[0-9].[0-9]*.[0-9]", |
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.
"--match=$tagPrefix[0-9].[0-9]*.[0-9]", | |
"--match=$tagPrefix[0-9].[0-9]*.[0-9]*", |
Don't under estimate how many patches a release can have 😅
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've looked at the tags, and I didn't see any version with more digits. However I did notice some pre-release labels like -PROF1-SNAPSHOT
, -alpha
, -RC1
.
I believe this is currently fine as the goal of describe is to look at the latest GA version. And maybe increment from it. Supporting semver pre-release could be added if needed ?
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Outdated
Show resolved
Hide resolved
d1625a0
to
dc5ebd9
Compare
I can probably take a look at testing it next week. |
shipkit-auto-version
by custom version plugin
8261595
to
1cd9c1e
Compare
# Conflicts: # build.gradle
1cd9c1e
to
a44e3a1
Compare
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Show resolved
Hide resolved
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Outdated
Show resolved
Hide resolved
I'm not totally familiar with the implementation details, but based on the test cases and their results, looks good! |
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.
thx for the review @sarahchen6
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Show resolved
Hide resolved
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Show resolved
Hide resolved
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Outdated
Show resolved
Hide resolved
buildSrc/src/integTest/kotlin/datadog/gradle/plugin/version/TracerVersionIntegrationTest.kt
Outdated
Show resolved
Hide resolved
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.
Looking great! Lots of improvement compared to the original solution (the axiom thing)
Left few comments 🗒️
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/GitCommandValueSource.kt
Outdated
Show resolved
Hide resolved
when { | ||
result.exitValue == 128 && | ||
(output.startsWith("fatal: not a git repository") | ||
|| output.startsWith("fatal: No names found, cannot describe anything.")) |
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.
Question: where the "no names" thing come from?
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.
Good question, it's git messages. The issue is that when the process fails, here git
, it fails with a statuscode, git "handled" failure exists with 128, but there might be various reasons.
I identified two messages that I think are ok to return the default version. And I choose to fail in other cases.
Frankly, this is not great, and a bit fragile for internalized git messages. But since we are using company laptop I assume all company laptops use english. Also, I expect these errors should be rare enough.
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Show resolved
Hide resolved
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Show resolved
Hide resolved
buildSrc/src/main/kotlin/datadog/gradle/plugin/version/TracerVersionPlugin.kt
Outdated
Show resolved
Hide resolved
Code coverage: total 57.09%, patch 100.00% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: fa7617c | Docs | Was this helpful? Give us feedback! |
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.
Thanks for the follow up updates 👍
What Does This Do
Supersedes #9149 by using custom version plugin.
shipkit-auto-version
works well, but doesn't allow to configure which part of the version to bump, in our case the minor version or the patch version depending on the branch.On any branch, get last tag
On
release/v*
branch, get last tagIf on CI don't check dirtyness
If local (not on CI), check dirtyness
Handles git worktree
Handles non git repo (e.g. repository zip archive), by emitting
0.1.0-SNAPSHOT
Motivation
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]