From fe7089858515662526680c70e6b78b191149285a Mon Sep 17 00:00:00 2001 From: Don Kendall Date: Mon, 6 Jul 2026 14:59:55 -0400 Subject: [PATCH] fix(ci): fork-sync survives tempdir .git cleanup; track stock-logistics-workflow check_ledoent_branch/the rebase helper clone into tempfile.TemporaryDirectory; on teardown shutil.rmtree hit git's read-only objects and raised OSError [Errno 39] Directory not empty: '.git', aborting the whole daily run (loaded 21 forks then died). Pass ignore_cleanup_errors=True (Py3.10+) to both. Also add the new ledoent/stock-logistics-workflow fork to forks.yml. --- .github/forks.yml | 6 ++++++ .github/scripts/fork_sync_digest.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/forks.yml b/.github/forks.yml index e5dd37d..ef8fd53 100644 --- a/.github/forks.yml +++ b/.github/forks.yml @@ -38,6 +38,12 @@ forks: upstream_track: "19.0" install_forward_port: false + - repo: ledoent/stock-logistics-workflow + branches: ["18.0", "19.0", "20.0"] + upstream_org: OCA + upstream_track: "19.0" + install_forward_port: false + - repo: ledoent/calendar branches: ["18.0", "19.0", "20.0"] upstream_org: OCA diff --git a/.github/scripts/fork_sync_digest.py b/.github/scripts/fork_sync_digest.py index 63e769f..fca8ea3 100644 --- a/.github/scripts/fork_sync_digest.py +++ b/.github/scripts/fork_sync_digest.py @@ -216,7 +216,7 @@ def check_ledoent_branch(repo: str, upstream_org: str | None, upstream_track: st check_status = "error" error_msg = "" - with tempfile.TemporaryDirectory() as tmpdir: + with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdir: tmp_path = Path(tmpdir) repo_dir = tmp_path / "repo" @@ -396,7 +396,7 @@ def rebase_feature_branches(repo: str, globs: list[str], base_branch: str) -> li fork_url = f"https://x-access-token:{token}@github.com/{repo}.git" results: list[dict] = [] try: - with tempfile.TemporaryDirectory() as tmpdir: + with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdir: repo_dir = Path(tmpdir) / "repo" clone = subprocess.run( ["git", "clone", "--branch", base_branch, "--single-branch", fork_url, "repo"],