Skip to content

Commit c1496c4

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) (cherry picked from commit bde1adc) (cherry picked from commit ea490b2)
1 parent 66e2bfd commit c1496c4

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
@@ -21,8 +21,11 @@ branches+=""
2121
for hash in $hashes; do
2222
branch=$(git branch -a --contains "$hash" 2>/dev/null| grep -oE '(master|stable/[a-z0-9.]+|unmaintained/[a-z0-9.]+)')
2323
if [ $? -ne 0 ]; then
24-
echo "Cherry pick hash $hash not on any master, stable or unmaintained branches"
25-
exit 1
24+
branch=$(git tag --contains "$hash" 2>/dev/null| grep -oE '([0-9.]+-eol)')
25+
if [ $? -ne 0 ]; then
26+
echo "Cherry pick hash $hash not on any master, stable, unmaintained or EOL'd branches"
27+
exit 1
28+
fi
2629
fi
2730
branches+=" $branch"
2831
checked=$(($checked + 1))

0 commit comments

Comments
 (0)