Merge lp://staging/~wgrant/launchpad/bug-675621-packages-binary-scaling into lp://staging/launchpad

Proposed by William Grant
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 12031
Proposed branch: lp://staging/~wgrant/launchpad/bug-675621-packages-binary-scaling
Merge into: lp://staging/launchpad
Diff against target: 298 lines (+76/-46)
4 files modified
lib/lp/soyuz/browser/tests/test_archive_packages.py (+18/-17)
lib/lp/soyuz/interfaces/publishing.py (+12/-5)
lib/lp/soyuz/model/publishing.py (+24/-13)
lib/lp/testing/factory.py (+22/-11)
To merge this branch: bzr merge lp://staging/~wgrant/launchpad/bug-675621-packages-binary-scaling
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+42607@code.staging.launchpad.net

Commit message

[r=adeuring][ui=none][bug=669717,675621] Fix getBuildStatusSummariesBySourceIds to have a constant query count. Landed by henninge.

Description of the change

Archive:+index and Archive:+packages have been timing out a bit lately, with lots of queries for single BuildFarmJobs and PackageBuilds. This branch fixes the culprit, PublishingSet.getBuildStatusSummariesForSourceIdsAndArchive, to prepopulate the cache, eliminating those queries and making the pages' query count constant.

I also fixed test_binary_query_counts to actually test scaling. This necessitated a change in the factory to coerce makeBinaryPackagePublishingHistory into creating a BinaryPackageBuild in the same context (as builds from other contexts are omitted from the PPA index). This same bug was making the baseline artificially low, so it has been increased to the real value.

And there are some lint fixes too.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.