code review mail and page show bugs currently related to the branch rather than bugs relevant to the merge proposal (e.g. fixed bugs are reported)

Bug #494807 reported by Martin Pool
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

Symptoms
========

Merge proposals like https://code.launchpad.net/~mbp/bzr/trivial/+merge/15909 show bugs currently associated to the branch. If the branch is used to fix a number of bugs, with separate merges of each fix, the list of bugs for old merge proposals is altered (so making the old proposals confusing) and the list of bugs for new proposals shows the bugs that were relevant to the old proposals).

Analysis
========

The data model does not link bugs to merge proposals, or even to revisions - it maps bugs to branches. So there isn't a graph or time based relationship that can be used to determine appropriate bugs.

BranchMergeProposal.related_bugs has this in its docstring:
'Implies that these bugs would be fixed, in the target, by the merge.'

But the data model and implementation do not match that docstring.

Solutions
=========
A heuristic of only showing open bugs would help for current merge proposals, but old merge proposals would still have their bug links changed (because they would either show no bugs (all closed) or unrelated new bugs, or if we showed closed bugs on merged proposals, they would show bugs from the other serial proposals of that branch.

One thing that would work is to capture a direct bug (or even task) relationship against the merge proposal. While the merge proposal is unmerged and picking up new revisions from the branch, we could automatically add more bugs to the merge proposal, and when it actually lands, freeze the set of bugs. This would mean that after merging, someone adding a bug-branch link would no longer have that link show up on the merged proposals, but this is perhaps easier to understand.

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 494807] [NEW] code review mail shouldn't mention already-merged bugs

On Thu, 10 Dec 2009 13:30:27 Martin Pool wrote:
> Public bug reported:
>
> In a case like
> https://code.edge.launchpad.net/~mbp/bzr/trivial/+merge/15909 this
> branch has previously been merged to fix bug 463099. I'm now reusing
> that trivial branch to do something else.
>
> However, both the web page and the review mail still mention the
> irrelevant bug 463099.
>
> Maybe they should only mention bugs fixed in the proposed branch and not
> in the target, or alternatively only bugs fixed in the unmerged
> revisions.

The problem with this is that bugs are linked to branches, not revisions.
Launchpad can't know that you are reusing a branch for a different reason.

  status triaged
  importance low

Changed in launchpad-code:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 494807] [NEW] code review mail shouldn't mention already-merged bugs

2009/12/10 Tim Penhey <email address hidden>:
> The problem with this is that bugs are linked to branches, not revisions.
> Launchpad can't know that you are reusing a branch for a different reason.

Well, at the bzr level the link is per revision. But the scanner
doesn't bring this across? OK.

I wonder if hiding fix released bugs would be another way to tackle it?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 494807] [NEW] code review mail shouldn't mention already-merged bugs

On Thu, 10 Dec 2009 13:56:57 Martin Pool wrote:
> 2009/12/10 Tim Penhey <email address hidden>:
> > The problem with this is that bugs are linked to branches, not revisions.
> > Launchpad can't know that you are reusing a branch for a different
> > reason.
>
> Well, at the bzr level the link is per revision. But the scanner
> doesn't bring this across? OK.

LP had bug-branch links well before bzr did, and it was implemented at the bug
<-> branch level. There have been conversations around changing it, but
nothing is planned or decided even.

> I wonder if hiding fix released bugs would be another way to tackle it?

Yes that would seem reasonable.

Martin Pool (mbp)
summary: - code review mail shouldn't mention already-merged bugs
+ code review mail shouldn't mention fix released bugs
Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 494807] [NEW] code review mail shouldn't mention already-merged bugs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Penhey wrote:
> On Thu, 10 Dec 2009 13:30:27 Martin Pool wrote:
>> Public bug reported:
>> Maybe they should only mention bugs fixed in the proposed branch and not
>> in the target, or alternatively only bugs fixed in the unmerged
>> revisions.
>
> The problem with this is that bugs are linked to branches, not revisions.
> Launchpad can't know that you are reusing a branch for a different reason.

Sure. On the other hand, if the bug was linked to the target branch,
then we would already be filtering it out, via BMP.related_bugs.

So Martin could address this by unlinking the bug from the source branch
(since the source branch no longer has the purpose of fixing this bug),
or by linking it to the target branch (since the target branch also
fixes the bug).

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkshDTsACgkQ0F+nu1YWqI2FPgCYsoymWZO8dJ8L0UoDW4zbCeTs
UQCfS3mI2je0MUOvCqNbhiRmgDRhMCw=
=EiEo
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote : Re: code review mail shouldn't mention fix released bugs

> So Martin could address this by unlinking the bug from the source branch (since the source branch no longer has the purpose of fixing this bug), or by linking it to the target branch (since the target branch also fixes the bug).

That's true, though that's more of a workaround than a fix for the bug.

Martin Pool (mbp)
summary: - code review mail shouldn't mention fix released bugs
+ code review mail and page shouldn't mention fix released bugs
Revision history for this message
Stuart Bishop (stub) wrote : Re: code review mail and page shouldn't mention fix released bugs

A side effect of this is that the 'ec2 land' utility used by Launchpad developers adds all these bugs to the commit message.

Revision history for this message
Stuart Bishop (stub) wrote :

At a minimum we need to work around this in 'ec2 land' to avoid screwing up our QA systems.

Changed in launchpad-foundations:
importance: Undecided → Medium
milestone: none → 10.03
status: New → Triaged
Gary Poster (gary)
Changed in launchpad-foundations:
milestone: 10.03 → none
Changed in launchpad:
importance: Low → High
summary: - code review mail and page shouldn't mention fix released bugs
+ code review mail and page show bugs currently related to the branch
+ rather than bugs relevant to the merge proposal (e.g. fixed bugs are
+ reported)
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.