mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-15 11:28:09 +00:00
use deploy logging context for app creation logs (#952)
This commit is contained in:
@ -347,7 +347,7 @@ class Client:
|
||||
not in str(err)
|
||||
):
|
||||
raise err
|
||||
logging.warning(
|
||||
logger.warning(
|
||||
"creating service principal failed with an error that occurs "
|
||||
"due to AAD race conditions"
|
||||
)
|
||||
@ -533,7 +533,7 @@ class Client:
|
||||
"PrincipalNotFound" in as_repr
|
||||
and "does not exist in the directory" in as_repr
|
||||
):
|
||||
logging.info("application principal not available in AAD yet")
|
||||
logger.info("application principal not available in AAD yet")
|
||||
if error:
|
||||
raise error
|
||||
else:
|
||||
|
@ -252,10 +252,10 @@ def add_application_password(
|
||||
while count < tries:
|
||||
count += 1
|
||||
if count > 1:
|
||||
logging.info("retrying app password creation")
|
||||
logger.info("retrying app password creation")
|
||||
try:
|
||||
password = add_application_password_impl(app_object_id, subscription_id)
|
||||
logging.info("app password created")
|
||||
logger.info("app password created")
|
||||
return password
|
||||
except GraphQueryError as err:
|
||||
error = err
|
||||
@ -265,9 +265,9 @@ def add_application_password(
|
||||
# azure/cli/command_modules/util/tests/
|
||||
# latest/test_rest.py#L191-L192
|
||||
if "Request_ResourceNotFound" in repr(err):
|
||||
logging.info("app unavailable in AAD, unable to create password yet")
|
||||
logger.info("app unavailable in AAD, unable to create password yet")
|
||||
else:
|
||||
logging.warning("unable to create app password: %s", err.message)
|
||||
logger.warning("unable to create app password: %s", err.message)
|
||||
time.sleep(wait_duration)
|
||||
if error:
|
||||
raise error
|
||||
|
Reference in New Issue
Block a user