Closed Bug 1043330 Opened 10 years ago Closed 7 years ago

Option collection values not honored, only keys

Categories

(Tree Management :: Treeherder: API, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

References

Details

Migrated from:
https://github.com/mozilla/treeherder-service/issues/172

geoelectric commented 23 days ago:

{
In the various sample data, as well as in the json format comment in model/derived/jobs.py, option_collection on the job object is a dict, where keys like "opt" or "debug" can be True or False.

However, in model/derived/refdata.py, the option_collection is transformed into a set via set(option_collection), which loses all the vals and only keeps the keys. Upshot is "debug: false" still marks debug as it's brought into the set.

            d = {"Foo": False}
            sd = set(d)
            sd

set(['Foo'])

It would be best to either filter any False values out of the collection dict prior to transforming it, or to specify a list instead of dict for that value (as the default value for the jobs.py reader uses)
}
To clarify, reason the "false" construct was used was due to bug 1043328 requiring a non-empty dict. However, since JSON has no concept of sets, would be best to have non-surprising behavior here.
Assignee: nobody → jeads
Status: NEW → ASSIGNED
Assignee: jeads → nobody
Blocks: 1072676
No longer blocks: 1072676
Component: Treeherder → Treeherder: API
Status: ASSIGNED → NEW
Priority: P3 → P4
Priority: P4 → P2
Blocks: 1196191
Submitting jobs/pushes via the API is now discouraged in favour of using Pulse (bug 1349182), so we're wontfixing API-specific issues.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.