From e10642b8314db31deecf2f0049e8b6176f988253 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Tue, 8 Sep 2026 10:56:42 +0100 Subject: [PATCH] More robust overnight benchmark commit identification. --- .github/workflows/benchmarks_run.yml | 4 +++- changelog/7271.internal.rst | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog/7271.internal.rst diff --git a/.github/workflows/benchmarks_run.yml b/.github/workflows/benchmarks_run.yml index 4bc9c79dcc..1bd4b0b9bb 100644 --- a/.github/workflows/benchmarks_run.yml +++ b/.github/workflows/benchmarks_run.yml @@ -144,8 +144,10 @@ jobs: run: | first_commit=${FIRST_COMMIT} if [ "$first_commit" == "" ] + # 26 hours to cope with variability in GHA start times. then - first_commit=$(git log --after="$(date -d "1 day ago" +"%Y-%m-%d") 23:00:00" --pretty=format:"%h" | tail -n 1) + cutoff_utc=$(date -u -d "26 hours ago" +"%Y-%m-%dT%H:%M:%SZ") + first_commit=$(git rev-list --since="$cutoff_utc" --reverse HEAD | head -n 1) fi if [ "$first_commit" != "" ] diff --git a/changelog/7271.internal.rst b/changelog/7271.internal.rst new file mode 100644 index 0000000000..0d5825f794 --- /dev/null +++ b/changelog/7271.internal.rst @@ -0,0 +1,4 @@ +:user:`trexfeathers` improved robustness of overnight benchmarks in GitHub +Actions - the start commit is the commit 26 hours ago, instead of the commit +24 hours after 23:00 yesterday - this is to cope with variability in GHA start +times. \ No newline at end of file