Skip to content

Commit 1fe9877

Browse files
authored
Merge branch 'master' into lucian/disable-multi-arch
2 parents 44ee445 + 6611d46 commit 1fe9877

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.githooks/pre-commit

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,19 @@ pre_commit() {
226226
run_job_in_background "python_formatting"
227227
run_job_in_background "check_erroneous_kubebuilder_annotations"
228228
run_job_in_background "validate_snippets"
229-
run_job_in_background "lint_helm_chart"
230229

231230
if wait_for_all_background_jobs; then
232-
echo -e "${GREEN}pre-commit: All checks passed!${NO_COLOR}"
233-
return 0
231+
# lint_helm_chart must be run after all the background jobs are finished because one of the BG jobs (update_jobs)
232+
# updates the helm chart. And lint_helm_chart requires the helm chart to be updated already.
233+
lint_helm_chart
234+
235+
local lint_helm_chart_status=$?
236+
if [ "$lint_helm_chart_status" -eq 0 ]; then
237+
echo -e "${GREEN}pre-commit: All checks passed!${NO_COLOR}"
238+
return 0
239+
else
240+
return 1
241+
fi
234242
else
235243
return 1
236244
fi

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)