From af2e934af543ef9feac1b663973d4aa31bcbcd0c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 6 Oct 2017 09:29:43 +0200 Subject: [PATCH] bots: Minimize races filing issues for bots We don't need to file or check for these issues on every iteration through the .tasks script. Lets start doing it one in every 10 times. Closes #7825 --- .tasks | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.tasks b/.tasks index 71064a57c9b..67e25c6346e 100755 --- a/.tasks +++ b/.tasks @@ -12,13 +12,24 @@ # Cockpit bots. set -ex + +# Scan for all tests bots/tests-scan +# When run automated, randomize to minimize stampeding herd +if [ -t 0 ]; then + chance=10 +else + chance=$(shuf -i 0-10 -n 1) +fi + # File issues for these tasks -bots/po-trigger -bots/image-trigger -bots/npm-trigger -bots/naughty-trigger +if [ $chance -gt 9 ]; then + bots/po-trigger + bots/image-trigger + bots/npm-trigger + bots/naughty-trigger +fi # Any tasks related to issues bots/issue-scan