#86 api/README lists "inconclusive" instead of "pending"
Closed: Fixed None Opened 11 years ago by mizdebsk.

If I use "inconclusive" in my JSON API calls then my check results aren't being included in the review. I had to use "pending" instead.

In my opinion the README should be corrected, precisely this line:
{{{
"result":"pass"|"fail"|"inconclusive",
}}}
should be changed to:
{{{
"result":"pass"|"fail"|"pending",
}}}
or even:
{{{
"result":"pass"|"fail"|"pending"|"na",
}}}
as "na" also seems to be a valid state.

Version: release-0.2.1


Hm... has anyone besides you really tested the JSON API for a long time? I can see a multitude of problems here:
- The python tests handles four different return codes:
- None, which is handled as 'na'.
- True -> 'pass'
- False -> 'fail'
- 'inconclusive' -> 'pending'
- The JSON API docs handles, according to docs :"pass"|"fail"|"inconclusive" i. e., not the 'na' case.
- The JSON API code seems to handle "result":"pass"|"fail"|"pending"|"na",

In short, the return codes are a mess both on the python and JSON side of the API. The value set (None, True, False, 'inconclusive') is a abominiation, isn't it?

A way to handle this would be to accept the internal codes "pass"|"fail"|"pending"|"na" in both python and JSON API. Documents should be updated to use these values.

Current practise of returning True, False, None and 'inconclusive' should still be supported by simple translation mechanisms, but be deprecated.

If this isn't the final answer on this, we still definitely need to create some order in the return codes IMHO.

Pushed a new branch json-fixes with remedies for #84, #85 and #86. Preferably needs a unit test (#87) before merging.

Login to comment on this ticket.

Metadata