Skip to content

Commit 724b24c

Browse files
authored
Create shallow canary marker (#240)
- Create shallow canary marker for eu-south-2, ap-southeast-3, me-central-1, eu-central-2, since some registries are not available in those regions. - Add training and hosting to shallow canary - Add placeholder values in replacement_values.py to avoid KeyError (not found) Issue #, if available: Description of changes: By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 57cedf2 commit 724b24c

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

test/canary/scripts/run_test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ pushd $E2E_DIR
9797
if [[ $SERVICE_REGION =~ ^(eu-north-1|eu-west-3)$ ]]; then
9898
# If select_regions_1 true we run the notebook_instance test
9999
pytest_args+=(-m "canary or select_regions_1")
100+
elif [[ $SERVICE_REGION =~ ^(eu-south-2|ap-southeast-3|me-central-1|eu-central-2)$ ]]; then
101+
pytest_args+=(-m "shallow_canary")
100102
else
101103
pytest_args+=(-m "canary")
102104
fi

test/e2e/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def pytest_configure(config):
3030
)
3131
config.addinivalue_line("markers", "slow: mark test as slow to run")
3232
config.addinivalue_line("markers", "select_regions_1: mark test to only run if in select region")
33+
config.addinivalue_line("markers", "shallow_canary: mark test to run in shallow canary tests")
3334

3435

3536
def pytest_collection_modifyitems(config, items):

test/e2e/replacement_values.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"ap-southeast-3": "951798379941.dkr.ecr.ap-southeast-3.amazonaws.com",
4848
"me-central-1": "272398656194.dkr.ecr.me-central-1.amazonaws.com",
4949
"eu-central-2": "680994064768.dkr.ecr.eu-central-2.amazonaws.com",
50+
"af-south-1": "510948584623.dkr.ecr.af-south-1.amazonaws.com",
5051
}
5152

5253
# https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/debugger.json
@@ -73,6 +74,11 @@
7374
"sa-east-1": "818342061345.dkr.ecr.sa-east-1.amazonaws.com",
7475
"eu-south-1": "563282790590.dkr.ecr.eu-south-1.amazonaws.com",
7576
"ap-northeast-3": "479947661362.dkr.ecr.ap-northeast-3.amazonaws.com",
77+
"af-south-1": "314341159256.dkr.ecr.af-south-1.amazonaws.com",
78+
"eu-south-2": "",
79+
"ap-southeast-3": "",
80+
"me-central-1": "",
81+
"eu-central-2": "",
7682
}
7783

7884
# https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html
@@ -103,6 +109,7 @@
103109
"ap-southeast-3": "951798379941.dkr.ecr.ap-southeast-3.amazonaws.com",
104110
"me-central-1": "272398656194.dkr.ecr.me-central-1.amazonaws.com",
105111
"eu-central-2": "680994064768.dkr.ecr.eu-central-2.amazonaws.com",
112+
"af-south-1": "455444449433.dkr.ecr.af-south-1.amazonaws.com",
106113
}
107114

108115

@@ -163,6 +170,9 @@
163170
"us-gov-west-1": "362178532790.dkr.ecr.us-gov-west-1.amazonaws.com",
164171
"ap-northeast-3": "990339680094.dkr.ecr.ap-northeast-3.amazonaws.com",
165172
"ap-southeast-3": "669540362728.dkr.ecr.ap-southeast-3.amazonaws.com",
173+
"eu-south-2": "",
174+
"me-central-1": "",
175+
"eu-central-2": "",
166176
}
167177

168178
# https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-configure-processing-jobs.html#clarify-processing-job-configure-container
@@ -189,6 +199,9 @@
189199
"eu-south-1": "638885417683.dkr.ecr.eu-south-1.amazonaws.com",
190200
"ap-northeast-3": "912233562940.dkr.ecr.ap-northeast-3.amazonaws.com",
191201
"ap-southeast-3": "705930551576.dkr.ecr.ap-southeast-3.amazonaws.com",
202+
"eu-south-2": "",
203+
"me-central-1": "",
204+
"eu-central-2": "",
192205
}
193206

194207
ENDPOINT_INSTANCE_TYPES = {

test/e2e/tests/test_endpoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def faulty_config(name_suffix, single_container_model):
218218

219219

220220
@service_marker
221+
@pytest.mark.shallow_canary
221222
@pytest.mark.canary
222223
class TestEndpoint:
223224
def create_endpoint_test(self, xgboost_endpoint):

test/e2e/tests/test_endpoint_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def single_variant_config():
7474

7575

7676
@service_marker
77+
@pytest.mark.shallow_canary
7778
@pytest.mark.canary
7879
class TestEndpointConfig:
7980
def test_create_endpoint_config(self, single_variant_config):

test/e2e/tests/test_trainingjob.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def test_stopped(self, xgboost_training_job):
8585
training_job_desc = get_sagemaker_training_job(training_job_name)
8686
assert training_job_desc["TrainingJobStatus"] in cfg.LIST_JOB_STATUS_STOPPED
8787

88+
@pytest.mark.shallow_canary
8889
@pytest.mark.canary
8990
def test_completed(self, xgboost_training_job):
9091
(reference, resource) = xgboost_training_job

0 commit comments

Comments
 (0)