Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: attach to PX4/Firmware Github status #139

Open
dagar opened this issue Nov 3, 2018 · 6 comments
Open

Idea: attach to PX4/Firmware Github status #139

dagar opened this issue Nov 3, 2018 · 6 comments

Comments

@dagar
Copy link
Member

dagar commented Nov 3, 2018

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
Copy link
Member

bkueng commented Nov 5, 2018

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
Copy link
Contributor

mrpollo commented Nov 5, 2018

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

@bkueng
Copy link
Member

bkueng commented Nov 6, 2018

@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
Copy link
Member Author

dagar commented Jan 19, 2019

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
Copy link
Member Author

dagar commented Jan 19, 2019

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

@junwoo091400
Copy link
Contributor

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants