From 8817832b54a2c7c6e3a2882c8eaaff738f10c496 Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Wed, 4 Dec 2024 19:14:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Remove=20sensitive=20da?= =?UTF-8?q?ta=20from=20logs=20(#6905)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/service-library/src/servicelib/redis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/service-library/src/servicelib/redis.py b/packages/service-library/src/servicelib/redis.py index f4b0c75ac72..00ed169e68d 100644 --- a/packages/service-library/src/servicelib/redis.py +++ b/packages/service-library/src/servicelib/redis.py @@ -17,6 +17,7 @@ from redis.backoff import ExponentialBackoff from settings_library.redis import RedisDatabase, RedisSettings from tenacity import retry +from yarl import URL from .background_task import periodic_task from .logging_utils import log_catch, log_context @@ -94,7 +95,8 @@ def __post_init__(self): async def setup(self) -> None: if not await self.ping(): await self.shutdown() - raise CouldNotConnectToRedisError(dsn=self.redis_dsn) + url_safe: URL = URL(self.redis_dsn).with_password("???") + raise CouldNotConnectToRedisError(dsn=f"{url_safe}") self._health_check_task = asyncio.create_task( self._check_health(),