Can't delete branches from the API that can be deleted from the web UI

Bug #702620 reported by James Westby
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
j.c.sackett

Bug Description

Hi,

There are branches that can be delete from the web UI that can't be deleted over the API.

This is because those branches have artefacts that are presented when deleting and you
can choose to proceed, but the destructor for the branch refuses to delete when you do this.

It is possible to manually delete all artefacts first, but that's a headache.

It should be possible to delete something easily, while still being "safe".

Attempts to use the destructor show up as OOPS-1839N1575

Related branches

tags: added: code-integration
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
tags: added: api
description: updated
tags: added: oops
Changed in launchpad:
importance: High → Critical
j.c.sackett (jcsackett)
Changed in launchpad:
assignee: nobody → j.c.sackett (jcsackett)
Revision history for this message
j.c.sackett (jcsackett) wrote :

Per a discussion with other developers, not having a branch delete over the webservice delete the involved artifacts was a conscious decision in the creation of the method.

That said, this method shouldn't return a 500, as shown in the OOPS.

j.c.sackett (jcsackett)
Changed in launchpad:
status: Triaged → In Progress
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 702620] Re: Can't delete branches from the API that can be deleted from the web UI

So the problem is this:
 - the method cannot be used unless it deletes artifacts that there
*is no other way to delete*.

Revision history for this message
j.c.sackett (jcsackett) wrote :

> *is no other way to delete*.

I don't think that's the case though--the artifacts that block (that I see) are stacked_on branches, which can be deleted, and merge proposals, which also can be deleted. All the other linkages should be removed when you use lp_delete or similar, since the exported delete method is destroySelfBreakReferences.

I agree with James:

> It is possible to manually delete all artefacts first, but that's a headache.

but I think in a scripting environment it's not too much to ask so that we don't have accidental deletions across the webservice, where it's much harder (and weirder) to pop up a message to the effect of "you have delete a bunch of other stuff! are you sure?"

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, Jan 27, 2011 at 3:56 AM, j.c.sackett <email address hidden> wrote:
>> *is no other way to delete*.
>
> I don't think that's the case though--the artifacts that block (that I
> see) are stacked_on branches, which can be deleted, and merge proposals,
> which also can be deleted. All the other linkages should be removed when
> you use lp_delete or similar, since the exported delete method is
> destroySelfBreakReferences.

stacked on branches cannot be deleted if they are owned by someone
else; ditto merge proposals.

>> It is possible to manually delete all artefacts first, but that's a
> headache.
>
> but I think in a scripting environment it's not too much to ask so that
> we don't have accidental deletions across the webservice, where it's
> much harder (and weirder) to pop up a message to the effect of "you have
> delete a bunch of other stuff! are you sure?"

And yet if someone writes a manual iterator, isn't the end effect identical?

p-Rob

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
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.