Skip to content

Commit 83e76c0

Browse files
committed
fix(ci/benchmarks): use git tree hash for benchmarks
Replace commit hash with git tree hash when caching benchmark results. This resolves caching issues where the exact commit hash may not have been run in the cache, ensuring consistent benchmark result lookup across cached and non-cached runs. This particularly affects ci-full runs that were squashed in the merge queue. Also removes unused p2p benchmark cache upload that had no corresponding download.
1 parent a08d4ca commit 83e76c0

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function bench {
314314
rm -rf bench-out
315315
mkdir -p bench-out
316316
bench_merge
317-
cache_upload bench-$COMMIT_HASH.tar.gz bench-out/bench.json
317+
cache_upload bench-$(git rev-parse HEAD^{tree}).tar.gz bench-out/bench.json
318318
}
319319

320320
function release_github {

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ case "$cmd" in
321321
print_usage
322322
;;
323323
"gh-bench")
324-
cache_download bench-$COMMIT_HASH.tar.gz
324+
cache_download bench-$(git rev-parse HEAD^{tree}).tar.gz
325325
;;
326326
"uncached-tests")
327327
if [ -z "$CI_REDIS_AVAILABLE" ]; then

yarn-project/p2p/bootstrap.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ function bench {
1414
./testbench/run_testbench.sh $config ./bench-out/$config
1515
done
1616
./testbench/consolidate_benchmarks.sh
17-
18-
cache_upload yarn-project-p2p-bench-results-$COMMIT_HASH.tar.gz ./bench-out/p2p-bench.json
1917
}
2018

2119
case "$cmd" in

0 commit comments

Comments
 (0)