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
1=== modified file 'apps/patchwork/utils.py'
2--- apps/patchwork/utils.py 2012-06-21 07:18:35 +0000
3+++ apps/patchwork/utils.py 2012-06-25 15:33:25 +0000
4@@ -32,7 +32,7 @@
5
6
7 # Timeout for git operations.
8-GIT_TIMEOUT = 55 * 60
9+GIT_TIMEOUT = 120 * 60
10
11
12 def get_patch_ids(d, prefix='patch_id'):
13@@ -207,7 +207,7 @@
14 if proc.returncode is None:
15 msg = "Timeout (%d/%d seconds) when fetching '%s' (%s).\n" % \
16 (wait, timeout, project.name, project.linkname)
17- msg += " Project path: %s\n Project tree:%s\n" % \
18+ msg += " Project path: %s\n Project tree: %s\n" % \
19 (root, project.source_tree)
20
21 # Kill the subprocess we started and all its children. This is
22@@ -228,7 +228,7 @@
23 ['kill', '-KILL'] + pids,
24 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
25 kill_stdout, kill_stderr = proc.communicate()
26- msg += " Stdout/stderr of the kill command: (%s, %s)." % (
27+ msg += " Output of the kill command: (%s, %s)." % (
28 kill_stdout, kill_stderr)
29
30 # Poll the subprocess we started to ensure it's not left behind as a
31@@ -243,8 +243,9 @@
32 stdout, stderr = proc.communicate()
33 if proc.returncode != 0:
34 raise FailedToFetchGitRepo(
35- "Failed to fetch %s.\nstdout:%s\nstderr:%s" % (
36- project.source_tree, stdout, stderr))
37+ "Failed to fetch %s (%s - %s).\n stdout: %s\n stderr: %s" % (
38+ project.source_tree, project.name, project.linkname, stdout,
39+ stderr))
40
41 return root
42

Subscribers

People subscribed via source and target branches