Closed
Bug 1174334
Opened 10 years ago
Closed 10 years ago
Missing option_collection of a job breaks the complete view of a changeset
Categories
(Tree Management :: Treeherder: API, defect, P2)
Tree Management
Treeherder: API
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1043338
People
(Reporter: whimboo, Unassigned)
Details
When sending a report to treeherder and the job does not contain a option_collection (as added via add_option_collection()), the whole web view will be broken.
Here you can see the traceback:
{"traceback": "Traceback (most recent call last):\n File \"/home/vagrant/venv/local/lib/python2.7/site-packages/rest_framework/views.py\", line 400, in dispatch\n response = handler(request, *args, **kwargs)\n File \"/home/vagrant/treeherder/treeherder/webapp/api/utils.py\", line 200, in use_jobs_model\n return model_func(*args, jm=jm, **kwargs)\n File \"/home/vagrant/treeherder/treeherder/webapp/api/jobs.py\", line 80, in list\n job[\"platform_option\"] = get_option(job, option_collections)\n File \"/home/vagrant/treeherder/treeherder/webapp/api/utils.py\", line 209, in get_option\n return option_collections[opt]['opt']\nKeyError: u'da39a3ee5e6b4b0d3255bfef95601890afd80709'\n", "detail": "u'da39a3ee5e6b4b0d3255bfef95601890afd80709'"}
We should check if an option collection is set, and fail if not. Or make a sane default value.
Updated•10 years ago
|
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Comment 1•10 years ago
|
||
Seems like we should default to just ``opt`` if we don't see an option collection. Or, like Henrik says, just fail on submission.
| Reporter | ||
Comment 2•10 years ago
|
||
So this is limited to the view of a full changeset not everything. Updating summary accordingly.
Summary: Adding no option_collection to a job breaks the complete view → Missing option_collection of a job breaks the complete view of a changeset
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•