Merge lp:~michael.nelson/launchpad/588684-builders-timeout into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | 10952 | ||||
| Proposed branch: | lp:~michael.nelson/launchpad/588684-builders-timeout | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
277 lines (+74/-60) 5 files modified
lib/lp/buildmaster/doc/builder.txt (+23/-25) lib/lp/buildmaster/interfaces/builder.py (+14/-8) lib/lp/buildmaster/model/builder.py (+22/-21) lib/lp/soyuz/browser/builder.py (+12/-6) lib/lp/soyuz/browser/tests/builder-views.txt (+3/-0) |
||||
| To merge this branch: | bzr merge lp:~michael.nelson/launchpad/588684-builders-timeout | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Abel Deuring (community) | code | 2010-06-04 | Approve on 2010-06-04 |
|
Review via email:
|
|||
Description of the Change
This branch replaces many heavy queries (one per builder group... eg. 386 virtual) on the /builders page with a single query that gets the stats for all builder groups.
See bug 588684 for the analysis from stub.
To test:
bin/test -vv -t doc/builder.txt -t builder-views.txt
It will need to be cherry-picked to replace the cowboy that currently disables the build queue size information.
| Michael Nelson (michael.nelson) wrote : | # |
On Fri, Jun 4, 2010 at 6:22 PM, Abel Deuring <email address hidden> wrote:
> Review: Approve code
> Nice work! Just one nitpick:
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
>
> + BinaryPackageB
> DistroArchSerie
> + # WHERE
>
> This "WHERE" looks a bit odd ;) I think you can remove it.
Done...(woops, left over from the SQL->Storm conversion). Thanks Abel.

Nice work! Just one nitpick:
=== modified file 'lib/lp/ buildmaster/ model/builder. py' buildmaster/ model/builder. py 2010-05-18 08:54:36 +0000 buildmaster/ model/builder. py 2010-06-04 15:28:29 +0000
--- lib/lp/
+++ lib/lp/
[...]
@@ -702,33 +703,34 @@
DistroArc hSeries) model.processor import Processor
from lp.soyuz.
- store = Store.of(processor) estimated_ duration) ,
Processor , require_ virtualized, *origin) .find( IStoreSelector) .get(MAIN_ STORE, SLAVE_FLAVOR)
BuildPack ageJob. job == BuildQueue.jobID,
BuildPack ageJob. build == BinaryPackageBu ild.id, ild.distro_ arch_series == DistroArchSerie s.id,
BinaryPac kageBuild. package_ build == PackageBuild.id, build_farm_ job == BuildFarmJob.id,
PackageBu ild.archive == Archive.id, build_farm_ job == BuildFarmJob.id, ild.distro_ arch_series == DistroArchSerie s.id,
DistroArc hSeries. processorfamily ID == Processor.familyID,
- origin = (
- Archive,
- BinaryPackageBuild,
- PackageBuild,
- BuildFarmJob,
- BuildPackageJob,
- BuildQueue,
- DistroArchSeries,
+ find_spec = (
+ Count(),
+ Sum(BuildQueue.
+ Archive.
)
- queue = store.using(
- BuildQueue,
+ store = getUtility(
+ results = store.find(
+ find_spec,
- BinaryPackageBu
+ PackageBuild.
- PackageBuild.
+ BinaryPackageBu
+ # WHERE
This "WHERE" looks a bit odd ;) I think you can remove it.