PX4 / flight_review

web application for flight log analysis & review
https://logs.px4.io/
BSD 3-Clause "New" or "Revised" License
202 stars 195 forks source link

Idea: attach to PX4/Firmware Github status #139

Open dagar opened 5 years ago

dagar commented 5 years ago

Github allows you to attach a status to a particular ref. Could we start attaching flight review uploads to Firmware commits as well?

https://developer.github.com/v3/repos/statuses/

For example, when browsing commits in PX4/Firmware master you can expand the status (checkmark) to see the tests that were run with that particular commit. image

It would be quite helpful to do this with flight review as well. The attached status could be the search by commit page. https://review.px4.io/browse?search=dc6245 Later the status description could be expanded to include the total number of flights, number of failures, etc.

bkueng commented 5 years ago

It would be quite helpful to do this with flight review as well. The attached status could be the search by commit page. https://review.px4.io/browse?search=dc6245

Sounds good. Do you want to look into that? Note that our rebasing strategy works against us here, since the commit hash of a tested branch changes.

Later the status description could be expanded to include the total number of flights, number of failures, etc.

I'm not sure if that's useful enough, since we typically have few logs on individual commits. I'd rather see that on the release/beta/RC level.

mrpollo commented 5 years ago

@bkueng perhaps we should expose a simple REST (or similar) API, this would allow for integrations

bkueng commented 5 years ago

@mrpollo we have that: https://github.com/PX4/flight_review/blob/master/tornado_handlers/db_info_json.py. It can be used for automated log downloads (or only the metadata if needed).

dagar commented 5 years ago

I've got this partially working. Jenkins will run periodically and update the status for all current branches off of PX4/Firmware.

BUILD_URL=https://review.px4.io/browse?search=${GIT_COMMIT}

curl -XPOST -H "Authorization: token ${OAUTH_TOKEN}" https://api.github.com/repos/PX4/Firmware/statuses/${GIT_COMMIT} -d "{
  \"state\": \"success\",
  \"target_url\": \"${BUILD_URL}\",
  \"context\": \"Flight Review\",
  \"description\": \"Public logs\"
}"

image

Any quick ideas for only attaching the flight review url if any flights actually exist?

dagar commented 5 years ago

@bkueng would it be possible to get a list of CI logs as well?

junwoo091400 commented 1 year ago

Cool idea! Do you think this would still be useful @dagar ?

I also imagine having a panels in the website with different releases, and show different statistics (e.g. successful flight ratios, number of flights), just like done in https://logs.px4.io/stats, but it does seem like it's lagging quite a lot for now :thinking: