From 7f7e86b744d1ba6665839d24b09d1e414dd73173 Mon Sep 17 00:00:00 2001 From: Silas Date: Thu, 30 Apr 2026 14:46:55 +0530 Subject: [PATCH 1/3] fix: handle Docker named volume for .venv in dev entrypoint --- Dockerfile.dev | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index a7620ae..97db91e 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -32,13 +32,16 @@ set -e # Check if the venv has a working Python (catches cross-platform mismatch) if ! /app/backend/.venv/bin/python -c "import sys" 2>/dev/null; then echo "[dev-entrypoint] Installing dependencies (venv missing or incompatible)..." - rm -rf /app/backend/.venv - cd /app/backend && uv sync && uv pip install "watchdog[watchmedo]" + # Docker named volumes can't be rm -rf'd, so try rm first then fall back to --clear + rm -rf /app/backend/.venv 2>/dev/null || true + cd /app/backend && uv venv --clear && uv sync && uv pip install "watchdog[watchmedo]" echo "[dev-entrypoint] Dependencies installed." else - # Venv exists and works, but ensure watchmedo is there too + # Venv works — run uv sync to pick up any new/changed dependencies + echo "[dev-entrypoint] Syncing dependencies..." + cd /app/backend && uv sync --quiet 2>/dev/null || true + # Ensure watchmedo is there too if ! command -v watchmedo >/dev/null 2>&1; then - echo "[dev-entrypoint] Installing watchmedo..." cd /app/backend && uv pip install "watchdog[watchmedo]" fi fi From fe25d7f717823661b9eb0adfe6ab3c68196eb1a7 Mon Sep 17 00:00:00 2001 From: Anubhav Singh Date: Thu, 30 Apr 2026 17:54:03 +0530 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Dockerfile.dev | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index 97db91e..ff4260c 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -32,8 +32,13 @@ set -e # Check if the venv has a working Python (catches cross-platform mismatch) if ! /app/backend/.venv/bin/python -c "import sys" 2>/dev/null; then echo "[dev-entrypoint] Installing dependencies (venv missing or incompatible)..." - # Docker named volumes can't be rm -rf'd, so try rm first then fall back to --clear - rm -rf /app/backend/.venv 2>/dev/null || true + # Docker named volumes can't always be rm -rf'd, so try rm first and warn if it fails + rm_err_file="$(mktemp)" + if ! rm -rf /app/backend/.venv 2>"$rm_err_file"; then + echo "[dev-entrypoint] Warning: failed to remove /app/backend/.venv; continuing with 'uv venv --clear'." >&2 + cat "$rm_err_file" >&2 + fi + rm -f "$rm_err_file" cd /app/backend && uv venv --clear && uv sync && uv pip install "watchdog[watchmedo]" echo "[dev-entrypoint] Dependencies installed." else From 356894f93a3f1fd961d5b53f59c678940ec14474 Mon Sep 17 00:00:00 2001 From: Anubhav Singh Date: Thu, 30 Apr 2026 22:37:18 +0530 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Dockerfile.dev | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index ff4260c..3c3f5f7 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -44,7 +44,9 @@ if ! /app/backend/.venv/bin/python -c "import sys" 2>/dev/null; then else # Venv works — run uv sync to pick up any new/changed dependencies echo "[dev-entrypoint] Syncing dependencies..." - cd /app/backend && uv sync --quiet 2>/dev/null || true + if ! (cd /app/backend && uv sync --quiet); then + echo "[dev-entrypoint] Warning: dependency sync failed; continuing with existing environment." >&2 + fi # Ensure watchmedo is there too if ! command -v watchmedo >/dev/null 2>&1; then cd /app/backend && uv pip install "watchdog[watchmedo]"