Skip to content

Commit bde1adc

Browse files
author
Elod Illes
committed
[tool] Fix backport validator for non-SLURP
non-SLURP branches are EOL'd in case they reach their end of maintained phase. This could produce a situation when a patch is merged in a non-SLURP branch that was deleted in the meantime and it's further backports fail on gate with backport validator as the hash of the non-SLURP version of the patch is not on any branch. This patch fixes the above issue as follows: in case a hash is not found on any branch, then it checks if it can be found under any *-eol tag and only fails if there is not found either. Change-Id: I56705bce8ee4354cd5cb1577a520c2d1c525f57b (cherry picked from commit e383b46) (cherry picked from commit 8b0ae72) (cherry picked from commit 88e49dd) (cherry picked from commit db438e5) (cherry picked from commit 0fdd21f) (cherry picked from commit 75497b0)
1 parent d86bb10 commit bde1adc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/check-cherry-picks.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ branches+=""
2626
for hash in $hashes; do
2727
branch=$(git branch -a --contains "$hash" 2>/dev/null| grep -oE '(master|stable/[a-z0-9.]+|unmaintained/[a-z0-9.]+)')
2828
if [ $? -ne 0 ]; then
29-
echo "Cherry pick hash $hash not on any master, stable or unmaintained branches"
30-
exit 1
29+
branch=$(git tag --contains "$hash" 2>/dev/null| grep -oE '([0-9.]+-eol)')
30+
if [ $? -ne 0 ]; then
31+
echo "Cherry pick hash $hash not on any master, stable, unmaintained or EOL'd branches"
32+
exit 1
33+
fi
3134
fi
3235
branches+=" $branch"
3336
checked=$(($checked + 1))

0 commit comments

Comments
 (0)