timeout querying archives for recipes via API

Bug #1009787 reported by Philip Muškovac
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Steve Kowalik

Bug Description

Trying to get a recipe using:

from launchpadlib.launchpad import Launchpad

lp = Launchpad.login_with("foo", "production")
neon = lp.people.findTeam(text='neon')[0]
recipe = neon.recipes[0]

results in OOPS-5801e40d03d4e8c0de8fbd46c1971a2a after a while.

Slow query:

SELECT *
FROM (
        (SELECT Archive.enabled,
                Archive.private,
                Archive.authorized_size,
                Archive.binaries_cached,
                Archive.build_debug_symbols,
                Archive.buildd_secret,
                Archive.building_count,
                Archive.commercial,
                Archive.date_created,
                Archive.description,
                Archive.displayname,
                Archive.distribution,
                Archive.external_dependencies,
                Archive.failed_count,
                Archive.id,
                Archive.name,
                Archive.OWNER, Archive.package_description_cache,
                               Archive.pending_count,
                               Archive.publish,
                               Archive.purpose,
                               Archive.relative_build_score,
                               Archive.require_virtualized,
                               Archive.signing_key,
                               Archive.sources_cached,
                               Archive.status,
                               Archive.succeeded_count,
                               Archive.total_count
         FROM Archive,
              TeamParticipation
         WHERE Archive.purpose = $INT
           AND TeamParticipation.team = Archive.OWNER
           AND TeamParticipation.person = $INT
         ORDER BY Archive.id)
      UNION
        (SELECT Archive.enabled,
                Archive.private,
                Archive.authorized_size,
                Archive.binaries_cached,
                Archive.build_debug_symbols,
                Archive.buildd_secret,
                Archive.building_count,
                Archive.commercial,
                Archive.date_created,
                Archive.description,
                Archive.displayname,
                Archive.distribution,
                Archive.external_dependencies,
                Archive.failed_count,
                Archive.id,
                Archive.name,
                Archive.OWNER, Archive.package_description_cache,
                               Archive.pending_count,
                               Archive.publish,
                               Archive.purpose,
                               Archive.relative_build_score,
                               Archive.require_virtualized,
                               Archive.signing_key,
                               Archive.sources_cached,
                               Archive.status,
                               Archive.succeeded_count,
                               Archive.total_count
         FROM Archive,
              ArchivePermission,
              TeamParticipation
         WHERE Archive.purpose = $INT
           AND ArchivePermission.archive = Archive.id
           AND TeamParticipation.person = $INT
           AND TeamParticipation.team = ArchivePermission.person
         ORDER BY Archive.id)) AS "_2cce"
ORDER BY displayname

Related branches

Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
tags: added: oops
tags: added: recipe
Curtis Hovey (sinzui)
tags: added: timeout
removed: oops
description: updated
Curtis Hovey (sinzui)
summary: - OOPS when trying to get a recipe using the python API
+ timeout querying archives for recipes via API
tags: added: api
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Steve Kowalik (stevenk)
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Revision history for this message
Steve Kowalik (stevenk) wrote :

While QAing the script in comment 0, I get https://oops.canonical.com/?oopsid=8197fd07f7a33c228ad122a5a96500ec on qastaging. This takes 5097 ms, so it might just scrap in on production, but some further work might be needed. It does work for changing a distroseries of a daily build on the UI, so I'm marking it as qa-ok.

tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Steve Kowalik (stevenk) wrote :

And it does work on production.

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.

Other bug subscribers

Remote bug watches

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