← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/process-accepted-bugs-job into lp:launchpad

 

The proposal to merge lp:~cjwatson/launchpad/process-accepted-bugs-job into lp:launchpad has been updated.

Description changed to:

== Summary ==

Bug 745799: Accepting an upload may need to close an arbitrarily large number of bugs.  Closing bugs involves a large number of queries due to structural subscriptions.  Uploads are sometimes accepted in contexts involving a timeout (notably DistroSeries:+queue and the PackageUpload.acceptFromQueue API method).  Even if structural subscription handling were made more efficient, the unbounded nature of the work means that there's a reasonable argument that it ought to be handled asynchronously in any event.

== Proposed fix ==

I understand that notifications may be made asynchronous at some point.  I'm not exactly sure what shape that work will take as I haven't seen anything concrete.  Pending that, I think a reasonable solution is simply to create a dedicated job for this, which can be run frequently; this can always be refactored in terms of something more general later if it turns out to be appropriate.

== Pre-implementation notes ==

  http://irclogs.ubuntu.com/2012/08/04/%23launchpad-dev.html#t01:49

Also, when this is deployed, we'll need to change the production crontabs to run this job.  We could also pre-emptively change ackee-launchpad to run 'cronscripts/process-job-source-groups.py FREQUENT' rather than 'cronscripts/process-job-source.py IPlainPackageCopyJobSource', which would be my personal preference, but mthaddon had some reservations:

  https://irclogs.canonical.com/2012/08/01/%23launchpad-ops.html#t10:36

Comments welcome.

== LOC Rationale ==

+445.  This is the last blocker for https://code.launchpad.net/~cjwatson/launchpad/remove-queue-tool/+merge/114464, which will be -1956 or thereabouts, and even given the queue API extensions that preceded this the whole arc comes out several hundred lines in the black.

== Tests ==

bin/test -vvct lp.soyuz.tests.test_processaccepted -t lp.soyuz.scripts.tests.test_queue.TestQueuePageClosingBugs

== Demo and Q/A ==

Set a distroseries to FROZEN on dogfood; upload a package to it, closing some open bug on that package; accept the package from the queue using 'queue accept' (lp:ubuntu-archive-tools) or the web UI; check that the bug is not closed immediately; run 'cronscripts/process-job-source.py IProcessAcceptedBugsJobSource'; check that the bug is now closed.

== Lint ==

Pre-existing lint, not straightforwardly fixable:

./lib/lp/services/config/schema-lazr.conf
     450: Line exceeds 80 characters.
    1032: Line exceeds 80 characters.
    1039: Line exceeds 80 characters.
    1577: Line exceeds 80 characters.

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/process-accepted-bugs-job/+merge/122420
-- 
https://code.launchpad.net/~cjwatson/launchpad/process-accepted-bugs-job/+merge/122420
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References