Merge lp:~abentley/launchpad/ampoule-0.1.1 into lp:launchpad
Proposed by
Aaron Bentley
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~abentley/launchpad/ampoule-0.1.1 |
Merge into: | lp:launchpad |
Diff against target: |
239 lines (+36/-69) 5 files modified
lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py (+2/-1) lib/lp/code/model/branchmergeproposaljob.py (+1/-9) lib/lp/services/job/runner.py (+30/-45) lib/lp/services/job/tests/test_runner.py (+1/-9) versions.cfg (+2/-5) |
To merge this branch: | bzr merge lp:~abentley/launchpad/ampoule-0.1.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+18481@code.launchpad.net |
To post a comment you must log in.
= Summary =
Update to Ampoule 0.2.0.
== Proposed fix ==
This branch updates ampoule and also adds a version for pyOpenSSL, which is a
new Ampoule dependency. This new version of ampoule has many changes that I
suggested, to push as much code upstream as I thought was architecturally
sound.
== Pre-implementation notes ==
None
== Implementation details ==
Instead of having a separate AMPChild subclass for every JobSource, a new
ampoule feature allows us to parameterize the JobRunnerProcess. We supply a
full path to the JobSource. In JobRunnerProcess, we import this and use it. I
used 'exec' for this, because the import module looked crazy complicated.
Instead of supplying our own BOOTSTRAP code in order to provide a bit more
startup code, a new ampoule feature lets us simply implement the context
manager protocol in JobRunnerProcess.
Instead of subclassing pool.ProcessPool to use SIGHUP, ampoule now lets us
parameterize the timout_signal.
Instead of converting our leases, which are datetimes, into timeout durations,
a new ampoule feature lets us supply them as deadlines.
job_class was renamed to job_source where this was a better description of its
usage.
== Tests == preview_ diffs
bin/test -vt test_runner -t update_
== Demo and Q/A ==
No visible change.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: services/ job/tests/ test_runner. py services/ job/runner. py code/model/ branchmergeprop osaljob. py
lib/lp/
lib/lp/
versions.cfg
lib/lp/
== Pyflakes notices ==
lib/lp/ services/ job/runner. py
240: undefined name 'job_source'
^^^ This is because of the exec.
== Pylint notices ==
lib/lp/ services/ job/runner. py s.__init_ _] Use of the exec statement s.__init_ _] Undefined variable 'job_source'
35: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
239: [W0122, JobRunnerProces
240: [E0602, JobRunnerProces
^^^ This is because of the exec.
lib/lp/ code/model/ branchmergeprop osaljob. py
22: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
23: [F0401] Unable to import 'lazr.enum' (No module named enum)