IntegrityError raised setting a branch for a project series.

Bug #583392 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Steve Kowalik

Bug Description

As seen on OOPS-1598O2756 an IntegrityError: duplicate key value violates unique constraint "branch_url_unique" was raised while setting the branch for a project.

Steps to reproduce:
1. Go to https://qastaging.launchpad.net/brightness/trunk/+setbranch
2. Choose "Import a branch hosted somewhere else"
3. Fill in Branch URL: http://bzr.pictuga.com/brightness/
4. Fill in branch name: dev
5. Click Update
6. Go back to https://qastaging.launchpad.net/brightness/trunk/+setbranch
7. Change the repeat steps 2 and 3. In Branch name fill in: foo
8. Click Update
9. OOPS-2048AY76

Paul Hummer (rockstar)
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Tim Penhey (thumper) wrote :

Almost certainly this is in the new product series set branch view.

Changed in launchpad:
importance: High → Critical
Curtis Hovey (sinzui)
tags: added: branches series
summary: - IntegrityError raised setting a branch for a project.
+ IntegrityError raised setting a branch for a project series.
Curtis Hovey (sinzui)
tags: added: easy
Revision history for this message
Aaron Bentley (abentley) wrote :

I was not able to reproduce this by going to https://staging.launchpad.net/bzr-horn/trunk/+setbranch creating a new branch, returning to https://staging.launchpad.net/bzr-horn/trunk/+setbranch and creating a new branch, or by setting the branch to its previous value.

Changed in launchpad:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Launchpad itself because there has been no activity for 60 days.]

Changed in launchpad:
status: Incomplete → Expired
description: updated
Changed in launchpad:
status: Expired → Triaged
Revision history for this message
Steve Kowalik (stevenk) wrote :

This is already fixed.

Attempting the above on qastaging results in "This foreign branch URL is already specified for the imported branch ~stevenk/brightness/dev."

Changed in launchpad:
status: Triaged → Fix Released
Revision history for this message
William Grant (wgrant) wrote :

It's not fixed, but it's not trivial to reproduce. See eg. OOPS-2107EE48

Changed in launchpad:
status: Fix Released → Triaged
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think this is more or less fixed by accident now: we no longer create MIRRORED branches, which are the only branches with url non-NULL, and so the only ones that can hit this constraint.

Revision history for this message
Steve Kowalik (stevenk) wrote :

This has been confirmed as fixed.

Changed in launchpad:
assignee: nobody → Steve Kowalik (stevenk)
status: Triaged → Fix Released
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.