canonical-certification-server doesn't run resource jobs, produces incomplete, invalid submission.xml
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Next Generation Checkbox (CLI) |
Fix Released
|
High
|
Daniel Manrique |
Bug Description
A report came in of a submission.xml that was unparsable. On analyzing the faulty submission I found that it lacked some mandatory resources, specifically uname, dpkg and lsb which are mandatory for a valid submission.
Further digging revealed that the canonical-
To reproduce this, run canonical-
The resources aren't shown so you can't explicitly select/deselect them, so the logical behavior is for them to actually run.
Complete the run and then look at the list of executed tests and you won't see any resources. Contrast that with running e.g. plainbox run -w some.whitelist, where the resources do run and show up.
Further, look at the submission.xml, and notice that at the end in the summary section, it lacks the architecture, kernel-release, distribution and distroseries elements that are required for a valid submission. Architecture comes from dpkg, distribution and distroseries from lsb, and kernel-release from uname.
Looking at the source code I see in checkbox_
A breakpoint on line 563 reveals that, up to this point, manager.
After running the tree and looking at its tree.selection, the resources have disappeared, so when we do self._update_
Looking now at the SelectableJobTr
To test this theory I changed the "return" on line 154 to "pass". When running things, I see the resources in the selection list (which is not entirely OK UI-wise, but I just leave them alone), and when completing the test run the resources have been executed and the xml contains all the needed data.
I'll come up with a fix in a moment, just wanted to describe the problem for future reference.
Related branches
- Zygmunt Krynicki (community): Approve
-
Diff: 28 lines (+7/-2)1 file modifiedcheckbox-ng/checkbox_ng/commands/test_cli.py (+7/-2)
Changed in checkbox: | |
assignee: | nobody → Daniel Manrique (roadmr) |
milestone: | none → 2014-mar-14 |
status: | Triaged → In Progress |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
affects: | checkbox → checkbox-ng |
Changed in checkbox-ng: | |
milestone: | 2014-mar-14 → none |
tags: | removed: checkbox-ng |
Changed in checkbox-ng: | |
milestone: | none → 0.4 |
Changed in checkbox-ng: | |
status: | Fix Committed → Fix Released |