Merge lp://qastaging/~dpb/tarmac/better-prereq-branches into lp://qastaging/tarmac

Proposed by David Britton
Status: Merged
Approved by: dobey
Approved revision: 428
Merged at revision: 426
Proposed branch: lp://qastaging/~dpb/tarmac/better-prereq-branches
Merge into: lp://qastaging/tarmac
Diff against target: 347 lines (+162/-23)
5 files modified
.bzrignore (+1/-0)
docs/introduction.txt (+15/-1)
tarmac/bin/commands.py (+43/-13)
tarmac/tests/__init__.py (+1/-0)
tarmac/tests/test_commands.py (+102/-9)
To merge this branch: bzr merge lp://qastaging/~dpb/tarmac/better-prereq-branches
Reviewer Review Type Date Requested Status
dobey Approve
Review via email: mp+197969@code.qastaging.launchpad.net

Commit message

Better prerequisite handling.

Description of the change

Tarmac understands the launchpad concept of prerequisite branches. The
following conditions are supported when evaluating a candidate merge
proposal (MP).

 * Multiple prerequisite non-superseded MPs => error
 * Prerequiste branch but no associated MP => error
 * Exactly one prerequisite non-superseded unmerged MP => skip
 * Exactly one prerequisite non-superseded *Merged* MP => proceed

Additionally, the tarmac queue is processed taking into account prerequisite
branches. That is, dependent branches are processed *after* their prerequisites.

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

32 + * Multiple prerequisite non-superseded MPs => error

How does one declare multiple prerequisite branches in Launchpad?

161 +++ tarmac/tests/test_commands.py 2013-12-05 22:45:14 +0000

Many of the changes in here seem unrelated to the prerequisite work, and seems to be just you changing some of the names for the third branch in several of the tests. How are these related?

The bug you filed is a duplicate of https://bugs.launchpad.net/tarmac/+bug/900731 and I've marked it as such already. Changing the --fixes here too would be great, if possible.

Also, you need to commit using an e-mail address that is associated with your Launchpad account. Your shortened canonical.com address does not appear to be associated to your account, and so Launchpad cannot link to your account, nor will tarmac be able to find you via the Launchpad API from the e-mail address in the commit.

review: Needs Fixing
426. By David Britton

remove renaming of 'branch3'

Revision history for this message
David Britton (dpb) wrote :

> 32 + * Multiple prerequisite non-superseded MPs => error
>
> How does one declare multiple prerequisite branches in Launchpad?
>

I don't know, but I didn't change or add this code path. You can see it at line 231 of tarmac/bin/commands.py. I just documented what would happen if this condition was hit.

What would you like me to do?

> 161 +++ tarmac/tests/test_commands.py 2013-12-05 22:45:14 +0000
>
> Many of the changes in here seem unrelated to the prerequisite work, and seems
> to be just you changing some of the names for the third branch in several of
> the tests. How are these related?
>

I reverted since you asked. They were to help me track down which test was failing before adding the 'unique_name' property. The error message coming out of bzrlib was not helpful and just contained 'branch3' which made it hard to see which test failed.

> The bug you filed is a duplicate of
> https://bugs.launchpad.net/tarmac/+bug/900731 and I've marked it as such
> already. Changing the --fixes here too would be great, if possible.

OK, I'll hopefully add '--fixes' to this commit

> Also, you need to commit using an e-mail address that is associated with your
> Launchpad account. Your shortened canonical.com address does not appear to be
> associated to your account, and so Launchpad cannot link to your account, nor
> will tarmac be able to find you via the Launchpad API from the e-mail address
> in the commit.

I added it.

427. By David Britton

Adding lp:900731 to the list of fixes

Revision history for this message
dobey (dobey) wrote :

> > 32 + * Multiple prerequisite non-superseded MPs => error
> >
> > How does one declare multiple prerequisite branches in Launchpad?
> >
>
> I don't know, but I didn't change or add this code path. You can see it at
> line 231 of tarmac/bin/commands.py. I just documented what would happen if
> this condition was hit.
>
> What would you like me to do?

I think you've misunderstood the code. That code is to deal with the case when a prerequisite branch has multiple proposals (ie, if someone re-proposed the branch and there is a superseded proposal, and such). These are not multiple prerequisites. The comments and documentation need to be clear about what the code is actually doing.

Revision history for this message
David Britton (dpb) wrote :

I'll copy it here again:

"Multiple prerequisite non-superseded MPs"

What is wrong with that statement? I didn't say multiple prerequisite
branches. I said multiple prerequisite MPs (merge proposals). What would
you like me to say to clarify it?

Also, there is no comment about this. It's just documentation in a Readme,
unless I'm missing something.

On Sun, Feb 9, 2014 at 12:27 PM, Rodney Dawes <email address hidden>wrote:

> > > 32 + * Multiple prerequisite non-superseded MPs => error
> > >
> > > How does one declare multiple prerequisite branches in Launchpad?
> > >
> >
> > I don't know, but I didn't change or add this code path. You can see it
> at
> > line 231 of tarmac/bin/commands.py. I just documented what would happen
> if
> > this condition was hit.
> >
> > What would you like me to do?
>
> I think you've misunderstood the code. That code is to deal with the case
> when a prerequisite branch has multiple proposals (ie, if someone
> re-proposed the branch and there is a superseded proposal, and such). These
> are not multiple prerequisites. The comments and documentation need to be
> clear about what the code is actually doing.
> --
>
> https://code.launchpad.net/~davidpbritton/tarmac/better-prereq-branches/+merge/197969
> You are the owner of lp:~davidpbritton/tarmac/better-prereq-branches.
>

--
David Britton <email address hidden>

428. By David Britton

Clean up wording around prerequisite branches

Revision history for this message
David Britton (dpb) wrote :

I committed a rewording change, I hope it's more clear. I think calling an MP "prerequisite" was what was leading to the confusion. (hopefully)

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches