-
Notifications
You must be signed in to change notification settings - Fork 309
Add script to perform release #9174
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (994.591 ms) : 0, 994591
Total [baseline] (10.687 s) : 0, 10686791
Agent [candidate] (993.758 ms) : 0, 993758
Total [candidate] (10.606 s) : 0, 10605896
section appsec
Agent [baseline] (1.172 s) : 0, 1172465
Total [baseline] (10.824 s) : 0, 10823749
Agent [candidate] (1.175 s) : 0, 1175168
Total [candidate] (10.764 s) : 0, 10764201
section iast
Agent [baseline] (1.132 s) : 0, 1132162
Total [baseline] (10.896 s) : 0, 10896270
Agent [candidate] (1.134 s) : 0, 1134066
Total [candidate] (10.87 s) : 0, 10869803
section profiling
Agent [baseline] (1.246 s) : 0, 1246275
Total [baseline] (11.02 s) : 0, 11020213
Agent [candidate] (1.247 s) : 0, 1247216
Total [candidate] (10.97 s) : 0, 10970471
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (685.947 ms) : 0, 685947
BytebuddyAgent [candidate] (685.316 ms) : 0, 685316
GlobalTracer [baseline] (242.417 ms) : 0, 242417
GlobalTracer [candidate] (242.18 ms) : 0, 242180
AppSec [baseline] (30.475 ms) : 0, 30475
AppSec [candidate] (30.497 ms) : 0, 30497
Debugger [baseline] (5.972 ms) : 0, 5972
Debugger [candidate] (5.973 ms) : 0, 5973
Remote Config [baseline] (679.074 µs) : 0, 679
Remote Config [candidate] (671.65 µs) : 0, 672
Telemetry [baseline] (8.218 ms) : 0, 8218
Telemetry [candidate] (8.216 ms) : 0, 8216
section appsec
BytebuddyAgent [baseline] (707.962 ms) : 0, 707962
BytebuddyAgent [candidate] (709.886 ms) : 0, 709886
GlobalTracer [baseline] (235.231 ms) : 0, 235231
GlobalTracer [candidate] (235.45 ms) : 0, 235450
IAST [baseline] (23.652 ms) : 0, 23652
IAST [candidate] (23.561 ms) : 0, 23561
AppSec [baseline] (170.295 ms) : 0, 170295
AppSec [candidate] (170.989 ms) : 0, 170989
Debugger [baseline] (5.776 ms) : 0, 5776
Debugger [candidate] (5.754 ms) : 0, 5754
Remote Config [baseline] (618.557 µs) : 0, 619
Remote Config [candidate] (606.476 µs) : 0, 606
Telemetry [baseline] (8.093 ms) : 0, 8093
Telemetry [candidate] (8.046 ms) : 0, 8046
section iast
BytebuddyAgent [baseline] (806.128 ms) : 0, 806128
BytebuddyAgent [candidate] (807.137 ms) : 0, 807137
GlobalTracer [baseline] (232.786 ms) : 0, 232786
GlobalTracer [candidate] (233.553 ms) : 0, 233553
IAST [baseline] (28.219 ms) : 0, 28219
IAST [candidate] (29.084 ms) : 0, 29084
AppSec [baseline] (28.969 ms) : 0, 28969
AppSec [candidate] (28.276 ms) : 0, 28276
Debugger [baseline] (6.637 ms) : 0, 6637
Debugger [candidate] (6.613 ms) : 0, 6613
Remote Config [baseline] (590.841 µs) : 0, 591
Remote Config [candidate] (600.041 µs) : 0, 600
Telemetry [baseline] (7.968 ms) : 0, 7968
Telemetry [candidate] (7.943 ms) : 0, 7943
section profiling
BytebuddyAgent [baseline] (678.993 ms) : 0, 678993
BytebuddyAgent [candidate] (677.325 ms) : 0, 677325
GlobalTracer [baseline] (361.831 ms) : 0, 361831
GlobalTracer [candidate] (363.175 ms) : 0, 363175
AppSec [baseline] (32.576 ms) : 0, 32576
AppSec [candidate] (32.668 ms) : 0, 32668
Debugger [baseline] (9.872 ms) : 0, 9872
Debugger [candidate] (11.548 ms) : 0, 11548
Remote Config [baseline] (656.35 µs) : 0, 656
Remote Config [candidate] (670.999 µs) : 0, 671
Telemetry [baseline] (10.266 ms) : 0, 10266
Telemetry [candidate] (8.8 ms) : 0, 8800
ProfilingAgent [baseline] (103.165 ms) : 0, 103165
ProfilingAgent [candidate] (104.388 ms) : 0, 104388
Profiling [baseline] (103.189 ms) : 0, 103189
Profiling [candidate] (104.412 ms) : 0, 104412
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (995.744 ms) : 0, 995744
Total [baseline] (8.598 s) : 0, 8598332
Agent [candidate] (999.187 ms) : 0, 999187
Total [candidate] (8.6 s) : 0, 8600143
section iast
Agent [baseline] (1.138 s) : 0, 1137642
Total [baseline] (9.33 s) : 0, 9329694
Agent [candidate] (1.132 s) : 0, 1131984
Total [candidate] (9.34 s) : 0, 9339662
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.887 ms) : 0, 686887
BytebuddyAgent [candidate] (690.453 ms) : 0, 690453
GlobalTracer [baseline] (242.473 ms) : 0, 242473
GlobalTracer [candidate] (242.424 ms) : 0, 242424
AppSec [baseline] (30.603 ms) : 0, 30603
AppSec [candidate] (30.473 ms) : 0, 30473
Debugger [baseline] (5.992 ms) : 0, 5992
Debugger [candidate] (6.002 ms) : 0, 6002
Remote Config [baseline] (670.301 µs) : 0, 670
Remote Config [candidate] (680.388 µs) : 0, 680
Telemetry [baseline] (8.22 ms) : 0, 8220
Telemetry [candidate] (8.284 ms) : 0, 8284
section iast
BytebuddyAgent [baseline] (811.115 ms) : 0, 811115
BytebuddyAgent [candidate] (805.465 ms) : 0, 805465
GlobalTracer [baseline] (233.625 ms) : 0, 233625
GlobalTracer [candidate] (232.766 ms) : 0, 232766
IAST [baseline] (29.917 ms) : 0, 29917
IAST [candidate] (27.427 ms) : 0, 27427
AppSec [baseline] (27.987 ms) : 0, 27987
AppSec [candidate] (31.069 ms) : 0, 31069
Debugger [baseline] (5.725 ms) : 0, 5725
Debugger [candidate] (5.786 ms) : 0, 5786
Remote Config [baseline] (587.608 µs) : 0, 588
Remote Config [candidate] (596.393 µs) : 0, 596
Telemetry [baseline] (7.867 ms) : 0, 7867
Telemetry [candidate] (8.036 ms) : 0, 8036
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section baseline
no_agent (37.028 ms) : 36737, 37319
. : milestone, 37028,
appsec (47.122 ms) : 46697, 47546
. : milestone, 47122,
code_origins (43.732 ms) : 43376, 44088
. : milestone, 43732,
iast (43.199 ms) : 42831, 43567
. : milestone, 43199,
profiling (47.944 ms) : 47505, 48384
. : milestone, 47944,
tracing (45.382 ms) : 44995, 45768
. : milestone, 45382,
section candidate
no_agent (36.575 ms) : 36281, 36869
. : milestone, 36575,
appsec (48.239 ms) : 47803, 48675
. : milestone, 48239,
code_origins (45.466 ms) : 45078, 45853
. : milestone, 45466,
iast (43.488 ms) : 43105, 43871
. : milestone, 43488,
profiling (48.898 ms) : 48406, 49390
. : milestone, 48898,
tracing (43.407 ms) : 43047, 43768
. : milestone, 43407,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section baseline
no_agent (4.321 ms) : 4273, 4368
. : milestone, 4321,
iast (9.478 ms) : 9323, 9633
. : milestone, 9478,
iast_FULL (14.122 ms) : 13837, 14407
. : milestone, 14122,
iast_GLOBAL (10.187 ms) : 10011, 10362
. : milestone, 10187,
profiling (8.694 ms) : 8556, 8833
. : milestone, 8694,
tracing (7.394 ms) : 7288, 7500
. : milestone, 7394,
section candidate
no_agent (4.492 ms) : 4427, 4556
. : milestone, 4492,
iast (9.542 ms) : 9385, 9698
. : milestone, 9542,
iast_FULL (13.848 ms) : 13571, 14125
. : milestone, 13848,
iast_GLOBAL (10.098 ms) : 9921, 10276
. : milestone, 10098,
profiling (8.293 ms) : 8169, 8418
. : milestone, 8293,
tracing (7.659 ms) : 7545, 7774
. : milestone, 7659,
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.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section baseline
no_agent (14.886 s) : 14886000, 14886000
. : milestone, 14886000,
appsec (14.86 s) : 14860000, 14860000
. : milestone, 14860000,
iast (18.907 s) : 18907000, 18907000
. : milestone, 18907000,
iast_GLOBAL (17.801 s) : 17801000, 17801000
. : milestone, 17801000,
profiling (15.181 s) : 15181000, 15181000
. : milestone, 15181000,
tracing (15.145 s) : 15145000, 15145000
. : milestone, 15145000,
section candidate
no_agent (15.267 s) : 15267000, 15267000
. : milestone, 15267000,
appsec (14.915 s) : 14915000, 14915000
. : milestone, 14915000,
iast (18.658 s) : 18658000, 18658000
. : milestone, 18658000,
iast_GLOBAL (18.099 s) : 18099000, 18099000
. : milestone, 18099000,
profiling (15.185 s) : 15185000, 15185000
. : milestone, 15185000,
tracing (14.676 s) : 14676000, 14676000
. : milestone, 14676000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~7450b1c20a, baseline=1.52.0-SNAPSHOT~785ce96272
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (2.413 ms) : 2363, 2463
. : milestone, 2413,
iast (2.197 ms) : 2134, 2260
. : milestone, 2197,
iast_GLOBAL (2.236 ms) : 2173, 2299
. : milestone, 2236,
profiling (2.052 ms) : 2000, 2104
. : milestone, 2052,
tracing (2.003 ms) : 1955, 2052
. : milestone, 2003,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (2.408 ms) : 2358, 2458
. : milestone, 2408,
iast (2.186 ms) : 2124, 2249
. : milestone, 2186,
iast_GLOBAL (2.236 ms) : 2173, 2299
. : milestone, 2236,
profiling (2.481 ms) : 2306, 2657
. : milestone, 2481,
tracing (2.017 ms) : 1968, 2065
. : milestone, 2017,
|
# Check if working copy is clean | ||
if ! git diff-index --quiet HEAD; then | ||
echo "❌ Working copy is not clean. Please commit or stash your changes before performing a release." | ||
exit 1 | ||
fi | ||
|
||
# Check if clone is up to date | ||
if ! git diff-index --quiet "$REMOTE/$CURRENT_BRANCH"; then | ||
echo "❌ Working copy is not up to date with $REMOTE/$CURRENT_BRANCH. Please pull the latest changes before performing a release." | ||
exit 1 | ||
fi | ||
echo "✅ Working copy is clean and up-to-date." | ||
|
||
# Check the git log history | ||
LAST_RELEASE_TAG=$(git describe --tags --abbrev=0) | ||
echo "ℹ️ Last release version: $LAST_RELEASE_TAG" | ||
SUSPICIOUS_COMMITS=$(git log --oneline --first-parent "$LAST_RELEASE_TAG"..HEAD | grep -E -v "Merge pull request #" | grep -E -v "\(#") | ||
if [ -n "$SUSPICIOUS_COMMITS" ]; then | ||
echo "❌ The following commits are not merge commits and may not be suitable for a release:" | ||
echo "$SUSPICIOUS_COMMITS" | ||
echo "Please review these commits before proceeding with the release." | ||
confirmOrAbort | ||
else | ||
echo "✅ All commits since the last release are merge commits." | ||
fi | ||
|
||
# Get the next release version | ||
VERSION=$(echo "$LAST_RELEASE_TAG" | grep -E '^v[0-9]+\.[0-9]+\.0$' | sed 's/^v//') | ||
if [ -z "$VERSION" ]; then | ||
echo "❌ Unable to determine the next release version from the last release tag: $LAST_RELEASE_TAG" | ||
exit 1 | ||
fi |
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: Collect "all issues" and report them all before exiting.
And moving the next version issue above suspicious commits, since this one has some interactivity.
echo "ℹ️ The release tag will be created and pushed. No abort is possible after this point." | ||
confirmOrAbort | ||
echo git tag -a -s -m "Release $NEXT_RELEASE_VERSION" "$NEXT_RELEASE_VERSION" | ||
echo git push "$REMOTE" "$NEXT_RELEASE_VERSION" --no-verify |
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: use --tags
as we only want to push tags no other things
} | ||
|
||
# Check if current branch is either 'master' or 'release/v*' | ||
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) |
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.
tip: You can use git name-rev --name-only @{u}
to get the upstream branch, from this you can extract the remote, if it's not origin
.
fi | ||
|
||
# Check if working copy is clean | ||
if ! git diff-index --quiet HEAD; then |
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.
note: This could be detected by the --dirty
option in git describe
confirmOrAbort | ||
else | ||
echo "✅ All commits since the last release are merge commits." | ||
fi |
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.
note:
- Using
--abbrev
greater than0
you'll see the number of commits since the nearest tag. This combines well with--first-parent
. - Also, might be a good idea to filter tags with our tag scheme
--match="v[0-9].[0-9]*.[0-9]
(note it's a glob pattern, the star compensate for the lack of repeating constructs). - And finally using
--dirty
should detect if the repo
E.g.
$ git describe --abbrev=8 --tags --first-parent --match="v[0-9].[0-9]*.[0-9]" --dirty
v1.51.0-30-g562e5338-dirty
fi | ||
|
||
# Check if clone is up to date | ||
if ! git diff-index --quiet "$REMOTE/$CURRENT_BRANCH"; then |
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.
issue This won't work as expected without a prior git fetch
.
What Does This Do
This script will replace the first step of the release process.
Motivation
It will help with the replacement of legacy gradle plugin by moving checks and computation in shell script instead to simplify our build. Check #9149
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]