hatching / triage

Hatching Triage public command-line utility and API library.
BSD 3-Clause "New" or "Revised" License
65 stars 22 forks source link

Fixes to go and python clients #15

Closed ljuturu closed 2 years ago

ljuturu commented 2 years ago

Hello Team,

For a given linux sample (ex: sample_id: "220321-15re6altvr"),

in kernel_report function - https://github.com/hatching/triage/blob/main/python/triage/client.py#L359 there's a minor discrepancy in overview_report -> tasks -> platform value.

task["platform'] may contain 'ubuntu' instead of 'linux' (in this example: 'ubuntu_amd64'). Although the stahp.json log file is available, instead of fetching it successfully, it's throwing a "Platform not supported" error. This error is thrown in both go and python clients.

A couple of fixes here:

  1. For both go, and python clients - added another case to search for 'ubuntu' in task.Platform and task["platform"]
  2. For python client, added support for 'macos' and 'android' log files as well.

Thank you very much. Please let me know if you have any questions or comments.

jbremer commented 2 years ago

Thank you - great catch! :-)

danielpanteleit commented 2 years ago

There is a missing closing parenthesis in the last block.

jbremer commented 2 years ago

Uh, thanks a lot @danielpanteleit. Should've double checked indeed :-)

ljuturu commented 2 years ago

There is a missing closing parenthesis in the last block.

oops! Sorry :( thank you so much!