diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2c72397a32..f8bfd1a9e6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,7 +12,7 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating - [ ] I have read the [CONTRIBUTING](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md) doc - [ ] I used the commit message format described in [CONTRIBUTING](https://github.com/aws/sagemaker-python-sdk/blob/master/CONTRIBUTING.md#committing-your-change) -- [ ] I have passed the region in to any/all clients that I've initialized as part of this change. +- [ ] I have passed the region in to any/all AWS clients that I've initialized as part of this change. - [ ] I have updated any necessary documentation, including [READMEs](https://github.com/aws/sagemaker-python-sdk/blob/master/README.rst) and [API docs](https://github.com/aws/sagemaker-python-sdk/tree/master/doc) (if appropriate) #### Tests diff --git a/tests/integ/test_session.py b/tests/integ/test_session.py index 6735b4845d..ed4c800521 100644 --- a/tests/integ/test_session.py +++ b/tests/integ/test_session.py @@ -24,9 +24,13 @@ def test_sagemaker_session_does_not_create_bucket_on_init( sagemaker_client_config, sagemaker_runtime_config, boto_config ): - boto_session = ( - boto3.Session(**boto_config) if boto_config else boto3.Session(region_name=DEFAULT_REGION) - ) + if boto_config: + boto_session = boto3.Session(**boto_config) + s3 = boto3.resource("s3", region_name=boto_config["region_name"]) + else: + boto_session = boto3.Session(region_name=DEFAULT_REGION) + s3 = boto3.resource("s3", region_name=DEFAULT_REGION) + sagemaker_client_config.setdefault("config", Config(retries=dict(max_attempts=10))) sagemaker_client = ( boto_session.client("sagemaker", **sagemaker_client_config) @@ -45,6 +49,4 @@ def test_sagemaker_session_does_not_create_bucket_on_init( sagemaker_runtime_client=runtime_client, default_bucket=CUSTOM_BUCKET_NAME, ) - - s3 = boto3.resource("s3", region_name=DEFAULT_REGION) assert s3.Bucket(CUSTOM_BUCKET_NAME).creation_date is None