Merge lp:~wgrant/launchpad/bug-1201984 into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 17080 |
Proposed branch: | lp:~wgrant/launchpad/bug-1201984 |
Merge into: | lp:launchpad |
Diff against target: |
110 lines (+47/-8) 4 files modified
lib/lp/code/vocabularies/sourcepackagerecipe.py (+1/-3) lib/lp/soyuz/browser/archive.py (+1/-4) lib/lp/soyuz/browser/tests/test_archive.py (+39/-0) lib/lp/soyuz/model/archive.py (+6/-1) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/bug-1201984 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Celso Providelo (community) | Approve | ||
Review via email: mp+225011@code.launchpad.net |
Commit message
Filter out disabled PPAs in ArchiveSet.
Description of the change
The target archive widget on +copy-packages had a launchpad.Append check added as part of the fix for bug #367796. This was inherited by the SourcePackageRecipe destination archive widget, so both widgets check launchpad.Append on every archive the user might be able to upload to.
But calculating launchpad.Append on an Archive directly is expensive, and can't be easily preloaded. This causes pages with a target archive widget to timeout for users who can upload to lots of PPAs. So I've fixed ArchiveSet.
Okay, as discussed on IRC, the definitive permission check is already performed in the asynchronous copy job. We will filter out disabled PPAs just to rule out *impossible* destination PPAs.
It's seems fair to avoid multiple O(n) queries when rendering the widget.