-
Notifications
You must be signed in to change notification settings - Fork 1.2k
change: allow only one integration test run per time #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
131ec2a
1c3c673
bde21ff
cb94061
bc2fa85
9c7367d
6b54703
7f94164
5da7012
b420893
5273782
266d7be
0e79d18
e4d6505
6c7af65
1a5fd2a
ef94d66
21ee422
d5b46aa
29bdd84
6f3e7d4
3877f2d
eec3f3a
7916612
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,34 @@ phases: | |
echo "skipping notebook test" | ||
fi | ||
|
||
# wait its turn to run integration tests | ||
- ACCOUNT=$(aws sts get-caller-identity --output text | awk '{print $1}') | ||
- S3_BUCKET_DIR=s3://sagemaker-us-west-2-${ACCOUNT}/ci-lock | ||
|
||
- | | ||
while true; do | ||
LAST_LOCK=$(aws s3 ls ${S3_BUCKET_DIR} | sort | tail -n 1 | awk '{print $4}') | ||
|
||
if [[ -z "$LAST_LOCK" ]] | ||
then | ||
echo "No locks. Creating lock." | ||
LOCK_FILE=$(date +%s) | ||
touch ${LOCK_FILE} | ||
|
||
aws s3 cp ${LOCK_FILE} ${S3_BUCKET_DIR}/${LOCK_FILE} | ||
|
||
else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per a locking system that was implemented in the Shopbop order system. You'll also want to ignore a file that is more than x hours old. To ensure dead processes don't lock forever. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The process won't lock forever because the code build has a time limit as well. Let's include this as a future improvement. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern is that a CodeBuild process dies or times out and leaves a file in S3. |
||
echo "Waiting on lock." | ||
sleep 30 | ||
fi | ||
done | ||
|
||
# run integration tests | ||
- | | ||
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then | ||
IGNORE_COVERAGE=- tox -e py36,py27 -- tests/integ -n 24 --boxed --reruns 2 | ||
else | ||
echo "skipping integration tests" | ||
fi | ||
finally: | ||
- aws s3 rm --recursive ${S3_BUCKET_DIR} |
Uh oh!
There was an error while loading. Please reload this page.