From c64c62bcc735b3d72d9440ec475852c4fa3b2b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 11 Jun 2024 18:06:46 +0200 Subject: [PATCH] Audit: Better messages --- Dockerfile | 2 +- github_app_geo_project/module/audit/__init__.py | 4 ++-- github_app_geo_project/module/audit/utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c20e41887d..0de436afe4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,7 +69,7 @@ RUN --mount=type=cache,target=/var/lib/apt/lists \ RUN --mount=type=cache,target=/var/lib/apt/lists \ --mount=type=cache,target=/var/cache,sharing=locked \ apt-get update \ - && apt-get install --assume-yes --no-install-recommends libproj-dev pkgconf libcairo2-dev + && apt-get install --assume-yes --no-install-recommends libproj-dev pkgconf libcairo2-dev libgraphviz-dev # From c2cwsgiutils diff --git a/github_app_geo_project/module/audit/__init__.py b/github_app_geo_project/module/audit/__init__.py index bf67ddf520..d9caea8c3d 100644 --- a/github_app_geo_project/module/audit/__init__.py +++ b/github_app_geo_project/module/audit/__init__.py @@ -205,10 +205,10 @@ async def _process_snyk_dpkg( ) message = module_utils.ansi_proc_message(proc) if proc.returncode != 0: - message.title = "Error while setting the Python version" + message.title = f"Error while setting the Python version to {python_version}" _LOGGER.error(message) else: - message.title = "Setting the Python version" + message.title = f"Setting the Python version to {python_version}" _LOGGER.debug(message) result, body, short_message, new_success = await audit_utils.snyk( diff --git a/github_app_geo_project/module/audit/utils.py b/github_app_geo_project/module/audit/utils.py index ca28bf7189..2fa734def7 100644 --- a/github_app_geo_project/module/audit/utils.py +++ b/github_app_geo_project/module/audit/utils.py @@ -91,7 +91,7 @@ async def snyk( result.append(message) else: message.title = f"Dependencies installed from {file}" - _LOGGER.debug(message) + _LOGGER.debug(message) proc = subprocess.run( # nosec # pylint: disable=subprocess-run-check ["git", "ls-files", "Pipfile", "*/Pipfile"], capture_output=True, encoding="utf-8", timeout=30