Skip to content

Commit e8af24a

Browse files
authored
infra: properly fail PR build if has-matching-changes fails (#1266)
1 parent 6f7d39a commit e8af24a

File tree

12 files changed

+14
-35
lines changed

12 files changed

+14
-35
lines changed

buildspec-localmodetests.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,5 @@ phases:
1111

1212
# local mode tests
1313
- start_time=`date +%s`
14-
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml")
15-
- |
16-
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
17-
tox -e py36 -- tests/integ -m local_mode --durations 50
18-
fi
19-
- ./ci-scripts/displaytime.sh 'py36 local mode' $start_time
20-
21-
- start_time=`date +%s`
22-
- |
23-
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
24-
tox -e py27 -- tests/integ -m local_mode --durations 50
25-
fi
26-
- ./ci-scripts/displaytime.sh 'py27 local mode' $start_time
14+
- execute-command-if-has-matching-changes "tox -e py27,py36 -- tests/integ -m local_mode --durations 50" "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"
15+
- ./ci-scripts/displaytime.sh 'py27,py36 local mode' $start_time

buildspec-notebooktests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@ phases:
66
# run notebook test
77
- echo "running notebook test"
88
- start_time=`date +%s`
9-
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "src/*.py" "setup.py" "setup.cfg" "tests/scripts/run-notebook-test.sh")
10-
- |
11-
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
12-
./tests/scripts/run-notebook-test.sh
13-
fi
9+
- execute-command-if-has-matching-changes "./tests/scripts/run-notebook-test.sh" "src/*.py" "setup.py" "setup.cfg" "tests/scripts/run-notebook-test.sh"
1410
- ./ci-scripts/displaytime.sh 'notebook test' $start_time

buildspec.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@ phases:
1111

1212
# run integration tests
1313
- start_time=`date +%s`
14-
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml")
15-
- |
16-
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
17-
python3 -u ci-scripts/queue_build.py
18-
fi
14+
- execute-command-if-has-matching-changes "python3 -u ci-scripts/queue_build.py" "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"
1915
- ./ci-scripts/displaytime.sh 'build queue' $start_time
2016

2117
- start_time=`date +%s`
2218
- |
23-
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
24-
tox -e py36 -- tests/integ -m "not local_mode" -n 512 --reruns 3 --reruns-delay 5 --durations 50 --boto-config '{"region_name": "us-east-2"}'
25-
fi
19+
execute-command-if-has-matching-changes "tox -e py36 -- tests/integ -m \"not local_mode\" -n 512 --reruns 3 --reruns-delay 5 --durations 50 --boto-config '{\"region_name\": \"us-east-2\"}'" "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"
2620
- ./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
2721

2822
post_build:

doc/using_chainer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ The ChainerModel constructor takes the following arguments:
509509
which should be executed as the entry point to model hosting.
510510
- ``source_dir (str):`` Optional. Path (absolute or relative) to a
511511
directory with any other training source code dependencies including
512-
tne entry point file. Structure within this directory will be
512+
the entry point file. Structure within this directory will be
513513
preserved when training on SageMaker.
514514
- ``enable_cloudwatch_metrics (boolean):`` Optional. If true, training
515515
and hosting containers will generate Cloudwatch metrics under the

doc/using_mxnet.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ The MXNetModel constructor takes the following arguments:
720720
which should be executed as the entry point to model hosting.
721721
- ``source_dir (str):`` Optional. Path (absolute or relative) to a
722722
directory with any other training source code dependencies including
723-
tne entry point file. Structure within this directory will be
723+
the entry point file. Structure within this directory will be
724724
preserved when training on SageMaker.
725725
- ``container_log_level (int):`` Log level to use within the container.
726726
Valid values are defined in the Python logging module.

doc/using_sklearn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ The sklearn_model constructor takes the following arguments:
486486
which should be executed as the entry point to model hosting.
487487
- ``source_dir (str):`` Optional. Path (absolute or relative) to a
488488
directory with any other training source code dependencies including
489-
tne entry point file. Structure within this directory will be
489+
the entry point file. Structure within this directory will be
490490
preserved when training on SageMaker.
491491
- ``enable_cloudwatch_metrics (boolean):`` Optional. If true, training
492492
and hosting containers will generate Cloudwatch metrics under the

src/sagemaker/chainer/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __init__(
9292
NCCL_DEBUG=WARN' will pass that option string to the mpirun
9393
command.
9494
source_dir (str): Path (absolute or relative) to a directory with
95-
any other training source code dependencies aside from tne entry
95+
any other training source code dependencies aside from the entry
9696
point file (default: None). Structure within this directory are
9797
preserved when training on Amazon SageMaker.
9898
hyperparameters (dict): Hyperparameters that will be used for

src/sagemaker/mxnet/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
file which should be executed as the entry point to training.
7272
This should be compatible with either Python 2.7 or Python 3.5.
7373
source_dir (str): Path (absolute or relative) to a directory with
74-
any other training source code dependencies aside from tne entry
74+
any other training source code dependencies aside from the entry
7575
point file (default: None). Structure within this directory are
7676
preserved when training on Amazon SageMaker.
7777
hyperparameters (dict): Hyperparameters that will be used for

src/sagemaker/pytorch/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(
6969
file which should be executed as the entry point to training.
7070
This should be compatible with either Python 2.7 or Python 3.5.
7171
source_dir (str): Path (absolute or relative) to a directory with
72-
any other training source code dependencies aside from tne entry
72+
any other training source code dependencies aside from the entry
7373
point file (default: None). Structure within this directory are
7474
preserved when training on Amazon SageMaker.
7575
hyperparameters (dict): Hyperparameters that will be used for

src/sagemaker/rl/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def create_model(
189189
hosting. This should be compatible with Python 3.5 (default:
190190
self.entry_point)
191191
source_dir (str): Path (absolute or relative) to a directory with
192-
any other training source code dependencies aside from tne entry
192+
any other training source code dependencies aside from the entry
193193
point file (default: self.source_dir). Structure within this
194194
directory are preserved when hosting on Amazon SageMaker.
195195
dependencies (list[str]): A list of paths to directories (absolute

src/sagemaker/sklearn/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(
7070
executing your model training code. List of supported versions
7171
https://github.com/aws/sagemaker-python-sdk#sklearn-sagemaker-estimators
7272
source_dir (str): Path (absolute or relative) to a directory with
73-
any other training source code dependencies aside from tne entry
73+
any other training source code dependencies aside from the entry
7474
point file (default: None). Structure within this directory are
7575
preserved when training on Amazon SageMaker.
7676
hyperparameters (dict): Hyperparameters that will be used for

src/sagemaker/xgboost/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(
8282
training code. List of supported versions
8383
https://github.com/aws/sagemaker-python-sdk#xgboost-sagemaker-estimators
8484
source_dir (str): Path (absolute or relative) to a directory with any other training
85-
source code dependencies aside from tne entry point file (default: None).
85+
source code dependencies aside from the entry point file (default: None).
8686
Structure within this directory are preserved when training on Amazon SageMaker.
8787
hyperparameters (dict): Hyperparameters that will be used for training (default: None).
8888
The hyperparameters are made accessible as a dict[str, str] to the training code

0 commit comments

Comments
 (0)