From 19f3efd7356994ee89216a13f9118a3000c9aef6 Mon Sep 17 00:00:00 2001 From: Denis Khoshaba Date: Mon, 19 Feb 2024 14:06:13 +1100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8Fadd=20PYTHONUNBUFFERED=20+=20?= =?UTF-8?q?PYTHONDONTWRITEBYTECODE=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ⚡️add PYTHONUNBUFFERED + PYTHONDONTWRITEBYTECODE * black fmt with new stable version --- Dockerfile | 4 +++- operator/Dockerfile | 4 +++- operator/netchecks_operator/config.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b876ff..0d35f05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,9 @@ ENV USERNAME=netchecks \ POETRY_VERSION=1.4.1 \ POETRY_HOME=/home/netchecks/bin/poetry \ POETRY_VENV=/home/netchecks/bin/poetry-venv \ - POETRY_CACHE_DIR=/home/netchecks/bin/.cache + POETRY_CACHE_DIR=/home/netchecks/bin/.cache \ + PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 RUN groupadd --gid ${USER_GID} ${USERNAME} \ && useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} diff --git a/operator/Dockerfile b/operator/Dockerfile index 02d522a..6553132 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -8,7 +8,9 @@ ENV USERNAME=netchecks \ POETRY_VERSION=1.4.1 \ POETRY_HOME=/home/netchecks/bin/poetry \ POETRY_VENV=/home/netchecks/bin/poetry-venv \ - POETRY_CACHE_DIR=/home/netchecks/bin/.cache + POETRY_CACHE_DIR=/home/netchecks/bin/.cache \ + PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 RUN groupadd --gid ${USER_GID} ${USERNAME} \ && useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} diff --git a/operator/netchecks_operator/config.py b/operator/netchecks_operator/config.py index 411e1ea..870c6f5 100644 --- a/operator/netchecks_operator/config.py +++ b/operator/netchecks_operator/config.py @@ -45,7 +45,9 @@ class ProbeConfig(BaseModel): podAnnotations: dict[str, str] = {} image: ImageConfig = ImageConfig() resources: dict[str, dict] = {} - verbose: bool = False # Don't enable until the operator has been modified to split stdout and stderr + verbose: bool = ( + False # Don't enable until the operator has been modified to split stdout and stderr + ) class Config(BaseSettings):