few fields missing when merging submissions with merge-submission tool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Next Generation Checkbox (CLI) |
Fix Released
|
High
|
Sylvain Pineau |
Bug Description
Version of Checkbox-ng: 1.4
Steps to reproduce:
===================
1. Download a recent submission (save it as sub1.tar.xz):
https:/
2. Try to "merge" the same submission twice:
$ checkbox-cli merge-submissions -o /tmp/final.tar.xz sub1.tar.xz sub1.tar.xz
3. Compare submission.json in both final.tar.xz and sub1.tar.xz
Expected result:
================
We end up with virtually the same JSON file in final.tar.xz and sub1.tar.xz
Actual result:
==============
Some fields are missing:
- description
- certification_
- category (for attachment jobs)
- kernel-cmdline
- buildstamp
- dkms_info_json
- (others might be missing such as bto-info)
Looking at checkbox-
Rationale
=========
I'm looking to reuse the same logic to create a small webapp to let users modify the content of a session (e.g. add/modify comment of a specific job), so I need the output session to be as close as possible from the original (minus the changes made by the end user, of course).
Related branches
- Pierre Equoy: Approve
- Checkbox Developers: Pending requested
-
Diff: 304 lines (+68/-23)6 files modifiedcheckbox_ng/launcher/merge_reports.py (+21/-4)
plainbox/impl/exporter/jinja2.py (+2/-4)
plainbox/impl/providers/exporters/data/checkbox.html (+7/-7)
plainbox/impl/providers/exporters/data/checkbox.json (+9/-1)
plainbox/impl/providers/exporters/data/multi-page.html (+8/-7)
plainbox/impl/session/state.py (+21/-0)
- Sylvain Pineau (community): Needs Information
-
Diff: 142 lines (+21/-11)6 files modifiedcheckbox_ng/launcher/merge_reports.py (+9/-3)
plainbox/impl/exporter/jinja2.py (+2/-4)
plainbox/impl/providers/exporters/data/checkbox.html (+2/-1)
plainbox/impl/providers/exporters/data/checkbox.json (+5/-0)
plainbox/impl/providers/exporters/data/multi-page.html (+2/-1)
plainbox/impl/session/state.py (+1/-2)
Changed in checkbox-ng: | |
assignee: | nobody → Sylvain Pineau (sylvain-pineau) |
importance: | Undecided → Medium |
importance: | Medium → High |
description: | updated |
Changed in checkbox-ng: | |
assignee: | Sylvain Pineau (sylvain-pineau) → Pierre Equoy (pieq) |
status: | New → In Progress |
Changed in checkbox-ng: | |
status: | In Progress → Confirmed |
Changed in checkbox-ng: | |
status: | In Progress → Fix Committed |
Changed in checkbox-ng: | |
assignee: | Pierre Equoy (pieq) → Sylvain Pineau (sylvain-pineau) |
Changed in checkbox-ng: | |
status: | Fix Committed → Fix Released |
The reason why so many fields are missing is because when exporting a Checkbox session to a json submission, the jinja2 exporter removes the namespaces from the job id:
https:/ /git.launchpad. net/checkbox- ng/tree/ plainbox/ impl/providers/ exporters/ data/checkbox. json#n48
When using this json submission to create a Checkbox session (before re-exporting it in json), the job ids are truncated, so when re-exporting to json, the ids "com.canonical. certification: :<job_id> " cannot be found; for example, for info/buildstamp:
https:/ /git.launchpad. net/checkbox- ng/tree/ plainbox/ impl/providers/ exporters/ data/checkbox. json#n152
the job is actually still there in the json file, but it's called 'info/buildstamp', not 'com.canonical. certification: :info/buildstam p', so the jinja template doesn't find it.