flight_review icon indicating copy to clipboard operation
flight_review copied to clipboard

Idea: attach to PX4/Firmware Github status

Open dagar opened this issue 7 years ago • 6 comments

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.

dagar avatar Nov 03 '18 14:11 dagar

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.

bkueng avatar Nov 05 '18 14:11 bkueng

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

mrpollo avatar Nov 05 '18 18:11 mrpollo

@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).

bkueng avatar Nov 06 '18 06:11 bkueng

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 avatar Jan 19 '19 20:01 dagar

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

dagar avatar Jan 19 '19 20:01 dagar

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:

junwoo091400 avatar Dec 23 '22 19:12 junwoo091400