lp:~zyga/checkbox/fix-1412660

Created by Zygmunt Krynicki and last modified
Get this branch:
bzr branch lp:~zyga/checkbox/fix-1412660
Only Zygmunt Krynicki can upload to this branch. If you are Zygmunt Krynicki please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Zygmunt Krynicki
Project:
Checkbox
Status:
Merged

Recent revisions

3536. By Zygmunt Krynicki

checkbox-ng:service: fix .via for jobs not in session

This patch fixes a crash when JobDefinitionWrapper.via was being
accessed after resuming a session, when the corresponding job was not
being a part of the session (but is still available on DBus via a
provider). For example:
 - create a provider with jobs [a, b]
 - create a session with job [a]
 - save the session before a runs
 - resume the session, the session now has [a] but not [b] in it
 - attempt to access b.via

In the current code, this would crash as there was an implicit,
incorrect assumption that each job visible on DBus is also a part of the
current session. The patch corrects that assumption by allowing no
JobState to exist for any JobDefinition.

(A copy of the relevant comment on the bug corresponding report)

1) Job definitions are either generated (and thus bound to a session) or
   not (and thus bound to a provider)
2) The .via property was previously a mutable state on a job. Now it is
   something one can access from session-bound JobState.
   2a) this means that .via cannot be accessed before a session exists
   2b) this means that .via cannot be accessed if a session doesn't
       contain a given job (despite that job existing).

In the past, via was always accessible, perhaps holding nothing or
perhaps holding stale data (from previous session run). Currently when
2b happens, we crash.

The fix is to simply return "" when there is no session or there
is no corresponding JobState in the session.

Fixes: https://bugs.launchpad.net/checkbox-ng/+bug/1412660
Signed-off-by: Zygmunt Krynicki <email address hidden>

3535. By Sylvain Pineau

"automatic merge of lp:~sylvain-pineau/checkbox/fix-1410501/ by tarmac [r=zkrynicki][bug=1410501][author=sylvain-pineau]"

3534. By Maciej Kisielewski

"automatic merge of lp:~kissiel/checkbox/fix-1412458/ by tarmac [r=zkrynicki][bug=1412458][author=kissiel]"

3533. By Zygmunt Krynicki

"automatic merge of lp:~zkrynicki/checkbox/POD/ by tarmac [r=kissiel][bug=][author=zkrynicki]"

3532. By Zygmunt Krynicki

"automatic merge of lp:~zkrynicki/checkbox/fix-1400646/ by tarmac [r=sylvain-pineau,kissiel][bug=1400646][author=zkrynicki]"

3531. By Daniel Manrique

" providers/certification-client: Add canonical-hw-collection-offline

This launcher is essentially identical to canonical-hw-collection but will not try to submit to hexr, meant for use in horridly restricted environments where using the network carries a severe penalty. A human will collect and post-process the resulting submission.xml files. [r=sylvain-pineau][bug=][author=roadmr]"

3530. By Sylvain Pineau

"Release_2015_Week3 [r=sylvain-pineau][bug=1331302,1341769,1347120,1382321,1383447,1387782,1387843,1388055,1388747,1389253,1399481,1403933,1406719][author=checkbox-dev]"

3529. By Launchpad Translations on behalf of checkbox-dev

Launchpad automatic translations update.

3528. By Taihsiang Ho

"Make checkbox-submit more automatic.

The argument secure_id becomes optional
and give it a default value if possible.

Add one more optical submission parameter in the configuration file
to specify the value of the argument, --url, automatically. [r=kissiel][bug=][author=taihsiangho]"

3527. By Sylvain Pineau

"automatic merge of lp:~sylvain-pineau/checkbox/fix-1361071/ by tarmac [r=sylvain-pineau,zkrynicki][bug=1361071][author=sylvain-pineau]"

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:checkbox
This branch contains Public information 
Everyone can see this information.

Subscribers