Merge lp://staging/~zyga/checkbox/dbus-resume into lp://staging/checkbox

Proposed by Zygmunt Krynicki
Status: Rejected
Rejected by: Zygmunt Krynicki
Proposed branch: lp://staging/~zyga/checkbox/dbus-resume
Merge into: lp://staging/checkbox
Diff against target: 1048 lines (+475/-190)
10 files modified
plainbox/plainbox/impl/dbus/decorators.py (+16/-1)
plainbox/plainbox/impl/dbus/service.py (+4/-1)
plainbox/plainbox/impl/job.py (+2/-2)
plainbox/plainbox/impl/result.py (+16/-3)
plainbox/plainbox/impl/service.py (+328/-153)
plainbox/plainbox/impl/session/jobs.py (+2/-2)
plainbox/plainbox/impl/session/legacy.py (+2/-10)
plainbox/plainbox/impl/session/resume.py (+6/-2)
plainbox/plainbox/impl/session/state.py (+7/-16)
plainbox/plainbox/impl/session/test_manager.py (+92/-0)
To merge this branch: bzr merge lp://staging/~zyga/checkbox/dbus-resume
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+184554@code.staging.launchpad.net

Description of the change

This branch contains the mammoth rewrite of service.py (all of the dbus code). I've focused on lifecycle management ONLY. The biggest change is that it's all event driven now, we don't have to check if something needs to be added or removed, plainbox core tells us about it.

I haven't touched any other problems present in the dbus layer (notably the use of threads to run jobs and the associated SNAFU).

Please review the service module and give feedback. Don't land this branch, I'll clean up the patches, add tests and most importantly write long description of how the dbus service lifecycle works and why it is (supposedly) correct.

There _are_ some missing bits in this branch as well, most notably we don't keep explicit track of generated jobs inside sessions (we only keep track of that inside the object manager that each session now is) but that is probably not required, I'm just not yet sure of that so it's not something I consider finished yet.

To post a comment you must log in.
2367. By Zygmunt Krynicki

plainbox:service: fix PEP-8 issues

Signed-off-by: Zygmunt Krynicki <email address hidden>

2368. By Zygmunt Krynicki

plainbox:session:legacy: fix PEP-8 issues

Signed-off-by: Zygmunt Krynicki <email address hidden>

2369. By Zygmunt Krynicki

plainbox:session:state: define on_result_change with JobState.on_result_changed

This patch drops explicit triggers of the on_job_result_changed() event
and replaces that with a connection to the on_result_changed() event
for each JobState object associated with a session.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2370. By Zygmunt Krynicki

plainbox:result: discard irrelevant entries passed to _JobResultBase

This patch drops "irrelevant" entries from the data object passed to
the initializer. Irrelevant entries are empty lists and None. This will
make effectively identical result objects have actually identical _data
instance attributes.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2371. By Zygmunt Krynicki

plainbox:result: add _JobResultBase.__eq__()

This patch adds a way to compare results. We already rely on this
comparison in JobState.result property setter function.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2372. By Zygmunt Krynicki

plainbox:result: make _JobResultBase.__repr__() display all attributes

Signed-off-by: Zygmunt Krynicki <email address hidden>

2373. By Zygmunt Krynicki

plainbox:dbus:decorators: wrap all decorated methods in sanity() to log exceptions

They python DBus bindings conveniently convert all of exceptions happening
on the python side of the world into DBus exceptions. This is somewhat
fine but is pretty excellent at hiding bugs as clients don't always
want to display python traceback when they get it. This patch wraps all
@dbus.service.method decoratd functions in a sanity() decorator that
logs all of the exceptions on plaibnox.dbus logger.

Signed-off-by: Zygmunt Krynicki <email address hidden>

2374. By Zygmunt Krynicki

fixup repr

2375. By Zygmunt Krynicki

legacy: DEV SNAPSHOT

2376. By Zygmunt Krynicki

fix legacy resume

2377. By Zygmunt Krynicki

add support for session pivot to resume

2378. By Zygmunt Krynicki

drop on_job_result_changed signal, maybe not drop it after all later

2379. By Zygmunt Krynicki

more logging in service

2380. By Zygmunt Krynicki

log dbus method errors

2381. By Zygmunt Krynicki

tweak job repr (drop this)

2382. By Zygmunt Krynicki

tweak signal logging in jobstate

2383. By Zygmunt Krynicki

dbus, try not to resume another session if we already have it resumed

2384. By Zygmunt Krynicki

dbus, ignore resume if there is nothing to resume

2385. By Zygmunt Krynicki

drop unused arg

Unmerged revisions

2385. By Zygmunt Krynicki

drop unused arg

2384. By Zygmunt Krynicki

dbus, ignore resume if there is nothing to resume

2383. By Zygmunt Krynicki

dbus, try not to resume another session if we already have it resumed

2382. By Zygmunt Krynicki

tweak signal logging in jobstate

2381. By Zygmunt Krynicki

tweak job repr (drop this)

2380. By Zygmunt Krynicki

log dbus method errors

2379. By Zygmunt Krynicki

more logging in service

2378. By Zygmunt Krynicki

drop on_job_result_changed signal, maybe not drop it after all later

2377. By Zygmunt Krynicki

add support for session pivot to resume

2376. By Zygmunt Krynicki

fix legacy resume

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches