Skip to content

Commit 60d5a4d

Browse files
authored
change: lower log level when getting execution role from a SageMaker Notebook (#1152)
1 parent eb82263 commit 60d5a4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sagemaker/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2832,7 +2832,7 @@ def get_caller_identity_arn(self):
28322832
)
28332833
return instance_desc["RoleArn"]
28342834
except ClientError:
2835-
LOGGER.warning(
2835+
LOGGER.debug(
28362836
"Couldn't call 'describe_notebook_instance' to get the Role "
28372837
"ARN of the instance %s.",
28382838
instance_name,

tests/unit/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def test_get_caller_identity_arn_from_a_role_after_describe_notebook_exception(b
318318
expected_role = "arn:aws:iam::369233609183:role/SageMakerRole"
319319
sess.boto_session.client("iam").get_role.return_value = {"Role": {"Arn": expected_role}}
320320

321-
with patch("logging.Logger.warning") as mock_logger:
321+
with patch("logging.Logger.debug") as mock_logger:
322322
actual = sess.get_caller_identity_arn()
323323
mock_logger.assert_called_once()
324324

0 commit comments

Comments
 (0)