Skip to content

Commit 3cd35b2

Browse files
nammnfealebenpae
authored andcommitted
flakiness - ignore openshift on retries (#4295)
# Summary ``` # We ignore openshift because they only run one test at a time. # Evergreen makes them dependant on each other, meaning if one gets restarted the whole suite gets restarted. ``` - openshift: REDACTED ## Proof of Work - test suite still does retries ``` [2025/04/15 21:32:22.248] Finding failed tasks in BUILD ID: ops_manager_kubernetes_e2e_static_multi_cluster_2_clusters_patch_b2c389ea62be9db5842a2077ded1dd85434c43ff_67fe6abad2544a000790ab3c_25_04_15_14_18_36 [2025/04/15 21:32:22.345] Finding failed tasks in BUILD ID: ops_manager_kubernetes_e2e_static_om70_kind_ubi_patch_b2c389ea62be9db5842a2077ded1dd85434c43ff_67fe6 ``` - manual run ``` /usr/bin/env bash /Users/nam.nguyen/projects/ops-manager-kubernetes/scripts/evergreen/retry-evergreen.sh + BUILD_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER:-1}" -H "Api-Key: ${EVERGREEN_API_KEY:-1}" ${EVERGREEN_API}/rest/v2/versions/"${VERSION:-1}" | jq -r ".build_variants_status[] | select(${EXCLUDE_JQ_FILTER}) | .build_id")) ++ curl -s -H 'Api-User: 1' -H 'Api-Key: 1' https://evergreen.mongodb.com/api/rest/v2/versions/1 ++ jq -r '.build_variants_status[] | select(.build_variant != "unit_tests" and .build_variant != "run_pre_commit" and .build_variant != "e2e_mdb_openshift_ubi_cloudqa" and .build_variant != "e2e_openshift_static_mdb_ubi_cloudqa") | .build_id' + exit 0 ``` ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you checked for release_note changes? ## Reminder (Please remove this when merging) - Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible - Our Short Guide for PRs: [Link](REDACTED) - Remember the following Communication Standards - use comment prefixes for clarity: * **blocking**: Must be addressed before approval. * **follow-up**: Can be addressed in a later PR or ticket. * **q**: Clarifying question. * **nit**: Non-blocking suggestions. * **note**: Side-note, non-actionable. Example: Praise * --> no prefix is considered a question
1 parent 27f3da1 commit 3cd35b2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/evergreen/retry-evergreen.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
set -Eeou pipefail
44

5-
set -x
6-
75
###
86
## This script automatically retriggers failed tasks from Evergreen based on the `version_id` passed in from Evergreen.
97
##
@@ -37,8 +35,16 @@ fi
3735
EVERGREEN_API="https://evergreen.mongodb.com/api"
3836
MAX_RETRIES="${EVERGREEN_MAX_RETRIES:-3}"
3937

38+
# Define build variants to exclude
39+
# We ignore openshift because they only run one test at a time.
40+
# Evergreen makes them dependant on each other, meaning if one gets restarted the whole suite gets restarted.
41+
EXCLUDE_VARIANTS=("unit_tests" "run_pre_commit" "e2e_mdb_openshift_ubi_cloudqa" "e2e_openshift_static_mdb_ubi_cloudqa")
42+
EXCLUDE_JQ_FILTER=$(printf '.build_variant != "%s" and ' "${EXCLUDE_VARIANTS[@]}" | sed 's/ and $//')
43+
4044
# shellcheck disable=SC2207
41-
BUILD_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER}" -H "Api-Key: ${EVERGREEN_API_KEY}" ${EVERGREEN_API}/rest/v2/versions/"${VERSION}" | jq -r '.build_variants_status[] | select(.build_variant != "unit_tests" and .build_variant != "run_pre_commit") | .build_id'))
45+
BUILD_IDS=($(curl -s -H "Api-User: ${EVERGREEN_USER}" -H "Api-Key: ${EVERGREEN_API_KEY}" \
46+
${EVERGREEN_API}/rest/v2/versions/"${VERSION}" | \
47+
jq -r ".build_variants_status[] | select(${EXCLUDE_JQ_FILTER}) | .build_id"))
4248

4349
for BUILD_ID in "${BUILD_IDS[@]}"; do
4450
echo "Finding failed tasks in BUILD ID: ${BUILD_ID}"

0 commit comments

Comments
 (0)