From 97c9a1efdec29108cf1e12105e43e18011681d1c Mon Sep 17 00:00:00 2001 From: "den.veremeytsev" Date: Fri, 30 Oct 2026 16:53:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20dags/migration=5Freporter=5Fdag.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/migration_reporter_dag.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dags/migration_reporter_dag.py b/dags/migration_reporter_dag.py index 5d80fc1..1a566ea 100644 --- a/dags/migration_reporter_dag.py +++ b/dags/migration_reporter_dag.py @@ -73,9 +73,20 @@ def migration_reporter_pipeline(): @task def pull_repo() -> str: - """Обновляет локальную копию репозитория миграций""" - stdout = _run(["git", "-C", REPO_DIR, "pull", "--ff-only"], timeout=600) - return stdout.strip() or "already up to date" + import os, subprocess + print(f"REPO_DIR={REPO_DIR}") + print(f"Exists: {os.path.exists(REPO_DIR)}") + print(f"CWD: {os.getcwd()}") + result = subprocess.run( + ["git", "-C", REPO_DIR, "pull", "--ff-only"], + capture_output=True, text=True, timeout=600 + ) + print(f"STDOUT: {result.stdout}") + print(f"STDERR: {result.stderr}") + print(f"RC: {result.returncode}") + if result.returncode != 0: + raise RuntimeError(f"git pull failed: {result.stderr}") + return result.stdout.strip() or "already up to date" @task def generate_excel() -> dict: