1 Commits

Author SHA1 Message Date
0e96bf5af3 Sync from dev @ 14435d1
Source: main (14435d1)
Excluded: live tenant exports, generated artifacts, and dev-only tooling.
2026-04-17 18:10:40 +02:00
3 changed files with 24 additions and 3 deletions

View File

@@ -205,7 +205,14 @@ def main() -> int:
pr = prs[0] pr = prs[0]
pr_id = int(pr.get("pullRequestId")) pr_id = int(pr.get("pullRequestId"))
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch]) _run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
try:
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
except RuntimeError as exc:
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
print(f"Drift branch '{drift_branch}' not found on origin; nothing to reject.")
return 0
raise
diff_paths = _run_diff_name_only(args.repo_root, baseline_branch, drift_branch) diff_paths = _run_diff_name_only(args.repo_root, baseline_branch, drift_branch)
changed_paths = { changed_paths = {
p.strip() p.strip()

View File

@@ -512,7 +512,14 @@ def main() -> int:
print("##vso[task.setvariable variable=DRIFT_PR_SUPPRESSED;isOutput=true]0") print("##vso[task.setvariable variable=DRIFT_PR_SUPPRESSED;isOutput=true]0")
return 0 return 0
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch]) _run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
try:
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
except RuntimeError as exc:
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
pass # Drift branch may not exist yet; fallback to HEAD below.
else:
raise
baseline_commitish = f"origin/{baseline_branch}" if _ref_has_commit(args.repo_root, f"origin/{baseline_branch}") else baseline_branch baseline_commitish = f"origin/{baseline_branch}" if _ref_has_commit(args.repo_root, f"origin/{baseline_branch}") else baseline_branch
drift_commitish = f"origin/{drift_branch}" if _ref_has_commit(args.repo_root, f"origin/{drift_branch}") else "HEAD" drift_commitish = f"origin/{drift_branch}" if _ref_has_commit(args.repo_root, f"origin/{drift_branch}") else "HEAD"
if not _workload_config_diff_exists( if not _workload_config_diff_exists(

View File

@@ -2498,7 +2498,14 @@ def main() -> int:
return 0 return 0
_debug(f"Active rolling PR detected: pr_id={pr_id}, source={source_ref}, target={target_ref}") _debug(f"Active rolling PR detected: pr_id={pr_id}, source={source_ref}, target={target_ref}")
_run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch, drift_branch]) _run_git(args.repo_root, ["fetch", "--quiet", "origin", baseline_branch])
try:
_run_git(args.repo_root, ["fetch", "--quiet", "origin", drift_branch])
except RuntimeError as exc:
if "couldn't find remote ref" in str(exc).lower() or "could not find remote ref" in str(exc).lower():
print(f"Drift branch '{drift_branch}' not found on origin; skipping summary update.")
return 0
raise
diff_output = _run_diff_name_status(args.repo_root, baseline_branch, drift_branch) diff_output = _run_diff_name_status(args.repo_root, baseline_branch, drift_branch)
changes = _parse_changes(diff_output, args.backup_folder, args.reports_subdir) changes = _parse_changes(diff_output, args.backup_folder, args.reports_subdir)
_debug(f"Parsed non-doc/report changes for summary: count={len(changes)}") _debug(f"Parsed non-doc/report changes for summary: count={len(changes)}")