From daa698e7d21db6ebca5d9b54afaefca54a8d1e26 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Mon, 11 May 2026 21:38:27 +0100 Subject: [PATCH] [AI] Fix /update-vrt merge step when only one shard has changes (#7802) The Merge VRT Patches job collects shard patches with the glob `/tmp/shard-patches/*/vrt-shard.patch`, which assumes every downloaded artifact lands in its own `path//` subdirectory. But actions/download-artifact only does that when 2+ artifacts match the pattern; when exactly one matches it unpacks the artifact directly into `path`. So whenever a `/update-vrt` run touches snapshots in a single shard (the common case) the patch ends up at `/tmp/shard-patches/vrt-shard.patch`, the glob matches nothing, and the job reports "No shard patches to merge" despite a patch having been generated (e.g. run 25679233565). Replace the glob with a recursive `find` so the patches are located under either layout. `merge-multiple: true` is not an option here because every shard artifact contains a file literally named `vrt-shard.patch` and they would overwrite each other. Co-authored-by: Claude Opus 4.7 (1M context) --- .github/workflows/vrt-update-generate.yml | 7 +++++-- upcoming-release-notes/7802.md | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 upcoming-release-notes/7802.md diff --git a/.github/workflows/vrt-update-generate.yml b/.github/workflows/vrt-update-generate.yml index a7156fe7f0..a4c5fb7565 100644 --- a/.github/workflows/vrt-update-generate.yml +++ b/.github/workflows/vrt-update-generate.yml @@ -264,8 +264,11 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - shopt -s nullglob - patches=(/tmp/shard-patches/*/vrt-shard.patch) + # actions/download-artifact puts a lone matched artifact directly in + # `path` but gives each of several its own `path//` subdir, so + # recurse instead of globbing `*/vrt-shard.patch` (which would miss + # the common single-shard case). + mapfile -t patches < <(find /tmp/shard-patches -type f -name 'vrt-shard.patch' | sort) if [ ${#patches[@]} -eq 0 ]; then echo "has_changes=false" >> "$GITHUB_OUTPUT" diff --git a/upcoming-release-notes/7802.md b/upcoming-release-notes/7802.md new file mode 100644 index 0000000000..a38475cbd9 --- /dev/null +++ b/upcoming-release-notes/7802.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MatissJanis] +--- + +Fix `/update-vrt` screenshot merge operation when exactly one patch is generated