Merge lp:~gary/tarmac/maybe-fix-push into lp:~launchpad/tarmac/lp-tarmac

Proposed by Gary Poster on 2011-01-05
Status: Merged
Approved by: Gary Poster on 2011-01-05
Approved revision: 390
Merged at revision: 390
Proposed branch: lp:~gary/tarmac/maybe-fix-push
Merge into: lp:~launchpad/tarmac/lp-tarmac
Diff against target: 23 lines (+9/-1)
1 file modified
tarmac/bin/commands.py (+9/-1)
To merge this branch: bzr merge lp:~gary/tarmac/maybe-fix-push
Reviewer Review Type Date Requested Status
Māris Fogels (community) 2011-01-05 Approve on 2011-01-05
Review via email: mp+45198@code.launchpad.net

Commit message

[r=mars] try to fix push problem

Description of the change

The tarmac run of the Launchpad test failed a second time because of a failed bzr push after the tests passed (identical symptoms/traceback to the previous attempt). My hypothesis is that the bzr Branch needs to be recreated in order to restart an ssh connection that has been languishing too long during the test run. This should be a simple way to fix it, if that's the case.

To post a comment you must log in.
Māris Fogels (mars) wrote :

I think this is worth a try. We can always back it out if it doesn't work. r=mars

Maris

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tarmac/bin/commands.py'
2--- tarmac/bin/commands.py 2011-01-03 20:59:37 +0000
3+++ tarmac/bin/commands.py 2011-01-05 02:51:58 +0000
4@@ -278,10 +278,18 @@
5 if collected_proposals:
6 # We actually have something to do!
7 # This hook is probably the one found in
8- # plugins/bundlecommand.py.
9+ # plugins/bundlecommand.py. It probably runs some tests.
10 tarmac_hooks['tarmac_bundle_merge'].fire(
11 self, target, restore_revno, collected_proposals)
12 self.logger.debug('Firing tarmac_post_merge hook')
13+ # We recreate the target branch because sometimes the
14+ # hooks took so long that (apparently) ssh connections
15+ # were made in the target branch earlier that are now
16+ # broken. The symptom was that the push did not work.
17+ target = Branch.create(
18+ self.launchpad.branches.getByUrl(url=branch_url),
19+ self.config,
20+ imply_commit_message=imply_commit_message)
21 tarmac_hooks['tarmac_post_merge'].fire(self, target)
22 # Push target.tree.branch to location branch_url.
23 target.push()

Subscribers

People subscribed via source and target branches

to all changes: