Merge lp:~milo/linaro-patchmetrics/bug1012037 into lp:linaro-patchmetrics

Proposed by Milo Casagrande
Status: Merged
Merged at revision: 364
Proposed branch: lp:~milo/linaro-patchmetrics/bug1012037
Merge into: lp:linaro-patchmetrics
Diff against target: 41 lines (+6/-5)
1 file modified
apps/patchwork/utils.py (+6/-5)
To merge this branch: bzr merge lp:~milo/linaro-patchmetrics/bug1012037
Reviewer Review Type Date Requested Status
Deepti B. Kalakeri (community) Approve
Review via email: mp+111873@code.launchpad.net

Description of the change

Hello,

I'm again proposing a small change in order to try to fix the timeout errors we have.
This small change increases the maximum git running time to 120 minutes. From local test, with a slow connection, I was getting total times of around 90 minutes. I increased the valued to have enough room for operation.

This merge also introduces small changes to the errors output.

To post a comment you must log in.
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

Looks good. +1.

review: Approve
Revision history for this message
Milo Casagrande (milo) wrote :

Thanks Deepti!
Will merge it right away, maybe we are able to get it deployed with the already opened RT ticket.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'apps/patchwork/utils.py'
--- apps/patchwork/utils.py 2012-06-21 07:18:35 +0000
+++ apps/patchwork/utils.py 2012-06-25 15:33:25 +0000
@@ -32,7 +32,7 @@
3232
3333
34# Timeout for git operations.34# Timeout for git operations.
35GIT_TIMEOUT = 55 * 6035GIT_TIMEOUT = 120 * 60
3636
3737
38def get_patch_ids(d, prefix='patch_id'):38def get_patch_ids(d, prefix='patch_id'):
@@ -207,7 +207,7 @@
207 if proc.returncode is None:207 if proc.returncode is None:
208 msg = "Timeout (%d/%d seconds) when fetching '%s' (%s).\n" % \208 msg = "Timeout (%d/%d seconds) when fetching '%s' (%s).\n" % \
209 (wait, timeout, project.name, project.linkname)209 (wait, timeout, project.name, project.linkname)
210 msg += " Project path: %s\n Project tree:%s\n" % \210 msg += " Project path: %s\n Project tree: %s\n" % \
211 (root, project.source_tree)211 (root, project.source_tree)
212212
213 # Kill the subprocess we started and all its children. This is213 # Kill the subprocess we started and all its children. This is
@@ -228,7 +228,7 @@
228 ['kill', '-KILL'] + pids,228 ['kill', '-KILL'] + pids,
229 stdout=subprocess.PIPE, stderr=subprocess.PIPE)229 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
230 kill_stdout, kill_stderr = proc.communicate()230 kill_stdout, kill_stderr = proc.communicate()
231 msg += " Stdout/stderr of the kill command: (%s, %s)." % (231 msg += " Output of the kill command: (%s, %s)." % (
232 kill_stdout, kill_stderr)232 kill_stdout, kill_stderr)
233233
234 # Poll the subprocess we started to ensure it's not left behind as a234 # Poll the subprocess we started to ensure it's not left behind as a
@@ -243,8 +243,9 @@
243 stdout, stderr = proc.communicate()243 stdout, stderr = proc.communicate()
244 if proc.returncode != 0:244 if proc.returncode != 0:
245 raise FailedToFetchGitRepo(245 raise FailedToFetchGitRepo(
246 "Failed to fetch %s.\nstdout:%s\nstderr:%s" % (246 "Failed to fetch %s (%s - %s).\n stdout: %s\n stderr: %s" % (
247 project.source_tree, stdout, stderr))247 project.source_tree, project.name, project.linkname, stdout,
248 stderr))
248249
249 return root250 return root
250251

Subscribers

People subscribed via source and target branches