NotOneError when trying to access +nominations with start > 548

Bug #302253 reported by Ursula Junque
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Gavin Panella

Bug Description

As seen on OOPS-1061EC22:

NotOneError: one() used with more than one result available

Steps to reproduce:
1) Go to Bugs nominated to intrepid page, https://edge.launchpad.net/ubuntu/intrepid/+nominations
2) Click on "Last", so it will go to the end of the bugs list
3) Being on the last page, click on "Previous" (https://edge.launchpad.net/ubuntu/intrepid/+nominations?start=600). It will OOPS like OOPS-1061EC29.

More OOPSes: OOPS-1061ED51

Tags: lp-bugs oops
Revision history for this message
Graham Binns (gmb) wrote :

Wow. That's weird. How many people is this affecting at the moment?

Changed in malone:
status: New → Triaged
Ursula Junque (ursinha)
description: updated
Revision history for this message
Gavin Panella (allenap) wrote :

Bug 289417 has two nominations for Intrepid. That should not happen!

Revision history for this message
Gavin Panella (allenap) wrote :

Marking this as High because this is data model breakage: two BugNomination records for the same bug and distroseries. I'll get a constraint added to the database asap, then perhaps we'll find out where the issue comes from. So far, there is only the one instance of this problem.

Changed in malone:
assignee: nobody → allenap
importance: Undecided → High
milestone: none → 2.1.12
Revision history for this message
Gavin Panella (allenap) wrote :

A data fixing script is available to remove the newest and lowest status duplicate nominations: https://pastebin.canonical.com/11666/

However, bug 284950 had multiple nominations which had been approved, resulting in multiple bugtasks for the same productseries.

The script above returns the list of nominations it deletes (for example, <https://pastebin.canonical.com/11668/>) which can be used to figure out which bugtasks to delete.

I don't think there's an easy way to automate the removal of duplicate bugtasks because it's not safe to assume which one to remove. There has only been one instance of duplicate bugtasks so far, so this isn't so bad.

I've prepared some extra constraints for the BugNomination table, but some may also be needed for BugTask.

Changed in malone:
status: Triaged → In Progress
Revision history for this message
Gavin Panella (allenap) wrote :

The data fixing script and new constraints on the BugNomination table should fix this bug, yet also create another bug (!). The good thing about this is that the new bug should appear closer to the real root cause of this bug, and make things break before data is corrupted again.

Changed in malone:
status: In Progress → 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.