Skip to content

Commit

Permalink
ref(dependencies): Switching to debug logs and sentry messages (#209)
Browse files Browse the repository at this point in the history
* ref(dependencies): Switching to debug logs and sentry messages

* adding cmd that failed to debug output
  • Loading branch information
IanWoodard authored Jan 14, 2025
1 parent fec98d6 commit 06d286a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion devservices/utils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from typing import TextIO
from typing import TypeGuard

from sentry_sdk import capture_message
from sentry_sdk import set_context

from devservices.configs.service_config import Dependency
Expand Down Expand Up @@ -601,7 +602,10 @@ def _run_command_with_retries(
break
except subprocess.CalledProcessError as e:
logger = logging.getLogger(LOGGER_NAME)
logger.exception("Attempt %s of %s failed: %s", i + 1, retries, e)
logger.debug("Attempt %s of %s for %s failed: %s", i + 1, retries, cmd, e)
capture_message(
f"Attempt {i + 1} of {retries} for {cmd} failed: {e}", level="warning"
)
if i == retries - 1:
raise e
time.sleep(backoff**i)
Expand Down

0 comments on commit 06d286a

Please # to comment.