Editing git repository with >1000 refs results in oops

Bug #1511838 reported by Björn Michaelsen on 2015-10-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Colin Watson

Bug Description

Steps to reproduce:
1/ go to https://code.launchpad.net/~documentfoundation/df-libreoffice/+git/core/+edit with an account having rights on it
2/ uncheck the "Owner Default" checkbox

Expected result:
Repos is not the default anymore.

Actual result:
Launchpad Ooopses:
{Error ID: OOPS-0e143694f22be9bc991059781adb81f4)

Related branches

Colin Watson (cjwatson) wrote :

This is because we're trying to snapshot a repository with >1000 (in fact currently 42566) refs. We should only snapshot the fields we need.

  ShortListTooBigError: Hard limit of 1000 exceeded.

    Traceback (most recent call last):
  Module zope.publisher.publish, line 132, in publish
    result = publication.callObject(request, obj)
  Module lp.services.webapp.publication, line 463, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  Module zope.publisher.publish, line 107, in mapply
    return debug_call(obj, args)
   - __traceback_info__: <security proxied zope.browserpage.metaconfigure.SimpleViewClass from /srv/launchpad.net/production/launchpad-rev-17838/lib/lp/code/browser/../templates/gitrepository-edit.pt instance at 0x2b692907fc10>
  Module zope.publisher.publish, line 113, in debug_call
    return obj(*args)
  Module lp.services.webapp.publisher, line 438, in __call__
  Module lp.app.browser.launchpadform, line 136, in initialize
    self.form_result = form_action.success(data)
  Module zope.formlib.form, line 620, in success
    return self.success_handler(self.form, self, data)
  Module lp.code.browser.gitrepository, line 356, in change_action
    self.context, providing=providedBy(self.context))
  Module lazr.lifecycle.snapshot, line 90, in __init__
    value, ISnapshotValueFactory, default=_marker)
  Module zope.component._api, line 102, in queryAdapter
    return adapter_hook(interface, object, name, default)
  Module zope.component.hooks, line 104, in adapter_hook
    return siteinfo.adapter_hook(interface, object, name, default)
  Module lp.services.webapp.snapshot, line 25, in snapshot_sql_result
    value, longest_expected=100, hardlimit=HARD_LIMIT_FOR_SNAPSHOT)
  Module lp.services.helpers, line 175, in shortlist
    'Hard limit of %d exceeded.' % hardlimit)
ShortListTooBigError: Hard limit of 1000 exceeded.

summary: - Removing the "Owner Default" in on git repo results in oops
+ Editing git repository with >1000 refs results in oops
tags: added: git lp-code oops
Changed in launchpad:
importance: Undecided → Critical
status: New → Triaged
Colin Watson (cjwatson) on 2015-11-02
Changed in launchpad:
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → In Progress
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson) on 2015-11-04
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson) on 2015-11-09
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers