OOPS when trying to delete stacked-on branches.

Bug #276144 reported by Jonathan Lange
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Tim Penhey

Bug Description

When you try to delete a stacked-on branch, Launchpad will generate an OOPS.

This is probably due to the schema constraints preventing the row from being deleted.

OOPS-1113EB6 IntegrityError: update or delete on table "branch" violates foreign key constraint "branch_stacked_on_fkey" on table "branch" DETAIL: Key (id)=(33364) is still referenced from table "branch".

Revision history for this message
Jonathan Lange (jml) wrote :

I haven't actually confirmed this yet. Just want to make sure it's being tracked.

Changed in launchpad-bazaar:
assignee: nobody → jml
importance: Undecided → High
milestone: none → 2.1.10
status: New → Incomplete
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I'd expect that they can't be, because the +delete code doesn't know how to clear the stacked_on foreign key reference. But I haven't checked either.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

So it turns out that if you try to delete the stacked on branch, you get an OOPS:

Retry: update or delete on table "branch" violates foreign key constraint "branch_stacked_on_fkey" on table "branch"<br /> DETAIL: Key (id)=(77) is still referenced from table "branch".<br /> <br />

This isn't good, though probably better than allowing the branch to be deleted...

Jonathan Lange (jml)
description: updated
Jonathan Lange (jml)
Changed in launchpad-bazaar:
milestone: 2.1.10 → 2.1.11
status: Incomplete → Triaged
Jonathan Lange (jml)
Changed in launchpad-bazaar:
milestone: 2.1.11 → 2.1.12
Revision history for this message
Curtis Hovey (sinzui) wrote :

I just got a similar OOPS. The table is different, but this may be a storm issue from the same bug.

OOPS-1060EA133:

Traceback (most recent call last):

    * Module zope.publisher.publish, line 141, in publish
      publication.handleException(
    * Module canonical.launchpad.webapp.publication, line 445, in handleException
      raise Retry(exc_info)

Retry: update or delete on table "branch" violates foreign key constraint "branchrevision__branch__fk" on table "branchrevision"
DETAIL: Key (id)=(26850) is still referenced from table "branchrevision".

Jonathan Lange (jml)
Changed in launchpad-bazaar:
milestone: 2.1.12 → 2.2.1
Revision history for this message
Jonathan Lange (jml) wrote :

Deferred to Feb since package branch work has taken higher priority.

Despite the ugliness of the behaviour, not a high priority bug since deleting stacked-on branches will always be forbidden (just in slightly nicer language).

Changed in launchpad-bazaar:
importance: High → Medium
milestone: 2.2.1 → 2.2.2
description: updated
Revision history for this message
Jonathan Lange (jml) wrote :

PUNT!

Changed in launchpad-bazaar:
assignee: jml → thumper
Tim Penhey (thumper)
Changed in launchpad-bazaar:
status: Triaged → In Progress
Revision history for this message
Tim Penhey (thumper) wrote :

Fixed in RF 7740.

Changed in launchpad-bazaar:
status: In Progress → Fix Committed
Tim Penhey (thumper)
Changed in launchpad-bazaar:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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