Merge ~jugmac00/launchpad:expose-whether-copies-in-upload-queues-contain-binaries into launchpad:master
Proposed by
Jürgen Gmach
Status: | Merged |
---|---|
Approved by: | Jürgen Gmach |
Approved revision: | f350ab9c07a5c0cafe9fe72089180d770742922c |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~jugmac00/launchpad:expose-whether-copies-in-upload-queues-contain-binaries |
Merge into: | launchpad:master |
Diff against target: |
84 lines (+34/-5) 2 files modified
lib/lp/soyuz/model/queue.py (+18/-1) lib/lp/soyuz/tests/test_packageupload.py (+16/-4) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+410593@code.launchpad.net |
Commit message
expose whether copies in upload queues contain binaries
To post a comment you must log in.
This is a partial review because I ran out of time before my long weekend, but I'll give you what I've got.
I think this may have the problem that, if a webservice request needs to fetch a collection of uploads and render their exported properties (of which `contains_build` is one), then this will incur an extra `PackageCopyJob` query for each such upload. I ran out of time trying to construct a test that would prove this, although I at least verified that it seems to be the case by stepping through some relevant bits of code. My partial attempt was https:/ /paste. ubuntu. com/p/sRbZSXs3z N/ - perhaps you can make something of that.
A fix will probably involve adding some more preloading to `lp.soyuz. model.queue. prefill_ packageupload_ caches` ; I suggest comparing with `lp.soyuz. browser. queue.QueueItem sView.loadPacka geCopyJobs` (called from the immediately- following `decoratedQueue Batch`) , which does something similar for the web UI case; you may not need quite as much preloading as that, and if you can manage to construct a failing test along the lines of what I wrote then you can be guided by that.
However, `PackageUpload. copy_source_ archive` already has a similar problem (apparently my fault in 2013), so this branch isn't making things any worse. As a result, I think the above would be good to fix but shouldn't be a blocker.
However however: I think we need to consider whether it's OK to put this in `contains_build`, or whether we need an additional property of some kind. The main client tool that consumes this is https:/ /git.launchpad. net/ubuntu- archive- tools/tree/ queue. If we need to change it too then that's OK, but we should work out whether this change will be backwards- compatible. I'm happy to help further with this once I'm back.