@@ -66,6 +66,18 @@ def run(cmd: list[str], *, cwd: Path | None = None, env: dict[str, str] | None =
6666 return subprocess .run (cmd , cwd = cwd , env = env , text = True , capture_output = True , check = True )
6767
6868
69+ def command_failure_summary (exc : subprocess .CalledProcessError ) -> str :
70+ """Return an actionable failure marker without copying command output to logs."""
71+ command = exc .cmd
72+ if isinstance (command , (list , tuple )) and command :
73+ executable = Path (str (command [0 ])).name
74+ elif isinstance (command , str ):
75+ executable = command .split (maxsplit = 1 )[0 ]
76+ else :
77+ executable = "unknown"
78+ return f"command={ executable } :exit={ exc .returncode } "
79+
80+
6981def has_changes (repo_dir : Path ) -> bool :
7082 result = run (["git" , "status" , "--porcelain" ], cwd = repo_dir )
7183 return bool (result .stdout .strip ())
@@ -496,11 +508,19 @@ def main() -> int:
496508 target_root .mkdir ()
497509 for repo in repo_specs :
498510 repo_dir = clone_repo (repo , target_root , token , dry_run = args .dry_run )
499- if not update_repo (
500- repo_dir ,
501- qpk_pin ,
502- strategy_heads = strategy_heads if phase == "consumers" else None ,
503- ):
511+ try :
512+ changed = update_repo (
513+ repo_dir ,
514+ qpk_pin ,
515+ strategy_heads = strategy_heads if phase == "consumers" else None ,
516+ )
517+ except subprocess .CalledProcessError as exc :
518+ results .append (
519+ f"{ repo .name } : dependency_update_failed:{ command_failure_summary (exc )} "
520+ )
521+ failures += 1
522+ continue
523+ if not changed :
504524 results .append (f"{ repo .name } : no changes needed" )
505525 continue
506526 try :
0 commit comments