Skip to content

Commit af2e934

Browse files
stefwaltermartinpitt
authored andcommitted
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
1 parent 9d58d69 commit af2e934

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.tasks

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,24 @@
1212
# Cockpit bots.
1313

1414
set -ex
15+
16+
# Scan for all tests
1517
bots/tests-scan
1618

19+
# When run automated, randomize to minimize stampeding herd
20+
if [ -t 0 ]; then
21+
chance=10
22+
else
23+
chance=$(shuf -i 0-10 -n 1)
24+
fi
25+
1726
# File issues for these tasks
18-
bots/po-trigger
19-
bots/image-trigger
20-
bots/npm-trigger
21-
bots/naughty-trigger
27+
if [ $chance -gt 9 ]; then
28+
bots/po-trigger
29+
bots/image-trigger
30+
bots/npm-trigger
31+
bots/naughty-trigger
32+
fi
2233

2334
# Any tasks related to issues
2435
bots/issue-scan

0 commit comments

Comments
 (0)