Skip to content

Commit 6611d46

Browse files
authored
Reduce Evergreen retries to 1 (#491)
# Summary Instead of five total attempts for end-to-end tests, let's reduce it to two. Decided in 02/10/2025's Discuss meeting ## Proof of Work Failing tests must restart only once.
1 parent 3ec0ca1 commit 6611d46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/evergreen/retry-evergreen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ -z "${EVERGREEN_API_KEY}" ]; then
3333
fi
3434

3535
EVERGREEN_API="https://evergreen.mongodb.com/api"
36-
MAX_RETRIES="${EVERGREEN_MAX_RETRIES:-3}"
36+
MAX_RETRIES=1
3737

3838
# Define build variants to exclude
3939
# We ignore openshift because they only run one test at a time.
@@ -49,7 +49,7 @@ BUILD_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER}" -H "Api-Key: ${EVERGREEN_A
4949
for BUILD_ID in "${BUILD_IDS[@]}"; do
5050
echo "Finding failed tasks in BUILD ID: ${BUILD_ID}"
5151
# shellcheck disable=SC2207
52-
TASK_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER}" -H "Api-Key: ${EVERGREEN_API_KEY}" ${EVERGREEN_API}/rest/v2/builds/"${BUILD_ID}"/tasks | jq ".[] | select(.status == \"failed\" and .execution <= ${MAX_RETRIES})" | jq -r '.task_id'))
52+
TASK_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER}" -H "Api-Key: ${EVERGREEN_API_KEY}" ${EVERGREEN_API}/rest/v2/builds/"${BUILD_ID}"/tasks | jq ".[] | select(.status == \"failed\" and .execution < ${MAX_RETRIES})" | jq -r '.task_id'))
5353

5454
for TASK_ID in "${TASK_IDS[@]}"; do
5555
echo "Retriggering TASK ID: ${TASK_ID}"

0 commit comments

Comments
 (0)