Skip to content

Commit ed94427

Browse files
authored
PYTHON-5388 - AI/ML Testing Pipeline Automatic Retries (#106)
1 parent 888ccca commit ed94427

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.evergreen/execute-tests.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,25 @@ set +a
1313

1414
cd ${REPO_NAME}
1515

16-
bash ${ROOT_DIR}/${DIR}/run.sh
16+
MAX_ATTEMPTS=3
17+
ATTEMPT=1
18+
EXIT_CODE=0
19+
set +e
20+
21+
while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
22+
bash ${ROOT_DIR}/${DIR}/run.sh
23+
24+
EXIT_CODE=$?
25+
26+
if [ $EXIT_CODE -eq 0 ]; then
27+
break
28+
else
29+
echo "Tests failed on attempt $ATTEMPT of $MAX_ATTEMPTS..."
30+
((ATTEMPT++))
31+
fi
32+
done
33+
34+
if [ $EXIT_CODE -ne 0 ]; then
35+
echo "Tests failed after $MAX_ATTEMPTS attempts."
36+
fi
37+
exit $EXIT_CODE

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ evergreen patch -p ai-ml-pipeline-testing --param REPO_ORG=caseyclements --param
187187

188188
### Handling Failing Tests
189189

190-
Tests are run periodically (nightly) and any failures will propagate into both the `dbx-ai-ml-testing-pipline-notifications` and `dbx-ai-ml-testing-pipeline-notifications-{language}` channel. Repo owners of this `ai-ml-testing-pipeline` library are required to join the `dbx-ai-ml-testing-pipeline-notifications`. Pipeline specific implementers must **at least** join `dbx-ai-ml-testing-pipline-notifications-{language}` (e.g. whomever implemented `langchain-js` must at least be a member of `dbx-ai-ml-testing-pipeline-notifications-js`).
190+
Tests are run periodically (nightly). All failing test suites are automatically retried up to two times. Any failures will propagate into both the `dbx-ai-ml-testing-pipline-notifications` and `dbx-ai-ml-testing-pipeline-notifications-{language}` channel. Repo owners of this `ai-ml-testing-pipeline` library are required to join the `dbx-ai-ml-testing-pipeline-notifications`. Pipeline specific implementers must **at least** join `dbx-ai-ml-testing-pipline-notifications-{language}` (e.g. whomever implemented `langchain-js` must at least be a member of `dbx-ai-ml-testing-pipeline-notifications-js`).
191191

192192
If tests are found to be failing, and cannot be addressed quickly, the responsible team MUST create a JIRA ticket within their team's project (e.g. a python failure should generate an `INTPYTHON` ticket), and disable the relevant tests
193193
in the `config.yml` file, with a comment about the JIRA ticket that will address it.

0 commit comments

Comments
 (0)