You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/04/09 15:29:38 UTC
(tooling-trusted-releases) branch arm updated: #982 - timeout for git clones
This is an automated email from the ASF dual-hosted git repository.
arm pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/arm by this push:
new 43d74364 #982 - timeout for git clones
43d74364 is described below
commit 43d74364de1c00f9b400a7a32fcf18fffcbde030
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Thu Apr 9 16:01:32 2026 +0100
#982 - timeout for git clones
---
atr/tasks/checks/compare.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/atr/tasks/checks/compare.py b/atr/tasks/checks/compare.py
index e7549a67..fd8748a1 100644
--- a/atr/tasks/checks/compare.py
+++ b/atr/tasks/checks/compare.py
@@ -187,7 +187,24 @@ async def _checkout_github_source(
repo_url = f"https://github.com/{payload.repository}.git"
started_ns = time.perf_counter_ns()
try:
- await asyncio.to_thread(_clone_repo, repo_url, payload.sha, checkout_dir)
+ await asyncio.wait_for(asyncio.to_thread(_clone_repo, repo_url, payload.sha, checkout_dir), timeout=120)
+ except TimeoutError:
+ elapsed_ms = (time.perf_counter_ns() - started_ns) / 1_000_000.0
+ log.exception(
+ "Timeout cloning GitHub repo for compare.source_trees",
+ repo_url=repo_url,
+ sha=payload.sha,
+ checkout_dir=str(checkout_dir),
+ clone_ms=elapsed_ms,
+ git_author_name=os.environ.get("GIT_AUTHOR_NAME"),
+ git_author_email=os.environ.get("GIT_AUTHOR_EMAIL"),
+ git_committer_name=os.environ.get("GIT_COMMITTER_NAME"),
+ git_committer_email=os.environ.get("GIT_COMMITTER_EMAIL"),
+ user=os.environ.get("USER"),
+ logname=os.environ.get("LOGNAME"),
+ email=os.environ.get("EMAIL"),
+ )
+ return None
except Exception:
elapsed_ms = (time.perf_counter_ns() - started_ns) / 1_000_000.0
log.exception(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org