Deleting a branch set for translations export generates a OOPS

Bug #522724 reported by Adi Roiban
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Tim Penhey

Bug Description

It looks like the Launchpad UI allows me to delete a branch that is currently set as exported for translations , but when it needs to do the actual job it just OOPSes.

It would be nice if LP could inform users they can not delete a specific branch due to the fact it is already set for export.

Another option, would be to acknowledge the setting and ask if the user also want to stop the translation export.

Tags: lp-code oops ui

Related branches

Revision history for this message
Данило Шеган (danilo) wrote :

Branch deletion should check for all the foreign references before trying to remove the branch (and I believe it does that already for things like MPs, so it just needs extending). It should be safe to unset a translations_branch when branch is being removed, provided we warn users about it.

affects: rosetta → launchpad-code
Revision history for this message
Tim Penhey (thumper) wrote :

Danilo, somewhat cheeky passing the buck as this should really have been done as part of the translation work.

Changed in launchpad-code:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Aaron Bentley (abentley) wrote :

Reproducing this issue is not trivial. It is really helpful to include an oops-id, so that we can look up the exact cause of the failure. I had assumed it was the existence of the BranchJob, but that can't be it, because those are deleted at branch deletion time.

Revision history for this message
Severin H (severinh) wrote :

Example OOPS: OOPS-1643EB2211

I hope you don't mind that I deleted the branch for good afterwards after having manually disabled the translation export.

Revision history for this message
Данило Шеган (danilo) wrote :

To clarify the "cheeky" bit: is there any reason why we wouldn't go and remove all the branch references automatically? If we did that, we wouldn't even have problems with BuildQueue stuff that Paul (I think) hit recently.

Tim, if you feel that's a bad idea, then I'd agree we should move this bug back to Launchpad Translations (so, please do it if you don't see anything generic in your future ;). Still, I personally prefer generic solutions since the rest of LP is going to keep breaking branch deletion as they introduce more features that depend on branches.

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 522724] Re: Deleting a branch set for translations export generates a OOPS

On Fri, 23 Jul 2010 21:55:07 you wrote:
> To clarify the "cheeky" bit: is there any reason why we wouldn't go and
> remove all the branch references automatically? If we did that, we
> wouldn't even have problems with BuildQueue stuff that Paul (I think)
> hit recently.
>
> Tim, if you feel that's a bad idea, then I'd agree we should move this
> bug back to Launchpad Translations (so, please do it if you don't see
> anything generic in your future ;). Still, I personally prefer generic
> solutions since the rest of LP is going to keep breaking branch deletion
> as they introduce more features that depend on branches.

We don't want general automagical resolution.

There are some places where there are links to branches where the links just
need to be NULLed out, like series linked branches.

When a branch is stacked on, we don't want to allow the main branch to be
deleted.

Other cases we have cascading deletes, like in the situation with the
BranchRevision table.

Before we make a generalised answer, I'd like to get our DBA and Architect
position on more general cascading deletes. These type of thinks should be
added in when the table is being linked.

Also I actually added a test that needs to be updated whenever anyone adds a
reference to the Branch table, extract shown here:

> == Branch references ==
>
> When new references to the branch table are added, these need to be
> taken into consideration with branch deletion.
>
> The current references to the branch table are shown here.

productseries.translations_branch was added, but the developer did not
actually read the text and take the new reference into consideration for the
branch deletion code.

Tim Penhey (thumper)
Changed in launchpad-code:
status: Triaged → Fix Committed
assignee: nobody → Tim Penhey (thumper)
milestone: none → 10.09
Curtis Hovey (sinzui)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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