-
Notifications
You must be signed in to change notification settings - Fork 7
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
Use Github Commit Status API #25
Comments
If you have a long-running pull request, comments do get annoying. |
This is the first thing I noted after I got coveralls working. 👍 |
👍 |
👎 Suggestion: Instead, go with a simpler solution and post a comment (as now), but instead of adding new comments with new commits, update the first comment. This doesn't clutter up the pull request overview, and sends no notifications to watching users, while still having the report in-place. |
@maul-esel that's a great suggestion, I think that's the way to go. |
Just a heads up: Code Climate seems to be using the status API and hoping to work with GitHub to get support for multiple statuses. |
Any news on this? |
👍 for maul-esel's comment |
I like that Coveralls shows the coverage of pull requests at GitHub. However, rather than commenting (which can send an email and show up on the front page feed), it'd be nicer if it could show the inline notifications similar to those by Travis CI. |
Github now supports displaying multiple statuses. |
👍 |
1 similar comment
👍 |
👍 |
@maul-esel's comment is no longer valid after github improved their status stuff quite recently. Yey! :) |
👍 |
👍 yes please, that would be very nice |
Using the multi-status stuff in GitHub would be great. Plus the comments only work with TravisCI, it would also be nice if status worked with other CI services like CircleCI. Otherwise there is no link from a pull request to the coverage information. |
👍 |
👍 for switching to the Status API now that GitHub can display multiple statuses for a commit/request. |
Adding it to the status would be great, especially if we were able to configure a minimum coverage ratchet. A close second option would be to only comment on changes in coverage, rather than for every commit, so as to reduce the noise. |
Awesome, found it. Thank you! 👍 for this addition! |
Ping @keradus. This is live now. |
So there can be literally no regression in coverage? Not even 0.01%? Or is there some user-defined threshold? |
@jasonmp85 if the PR includes un-tested lines of code, shouldn't it raise a red flag? Seems like the PR status is just a barometer; you can still use the auto-merge button, having a failure status won't prevent you from merging. |
@nickmerwin ideally, yes. In practice I'm writing a PostgreSQL extension in C and sometimes I handle errors that are very difficult to reliably reproduce in their regression test environment, which is pretty black-box. So some lines of error handling may work out to basically be sanity checks that you'd never expect to be triggered (and indeed probably can't trigger without a totally ruined DB), but need to be there to make sure the world is sane. But I see the argument and it makes sense. Allowing even 0.01% regression means you can slowly dip into "bad" territory over time (boiling frog analogy, etc.). I know the merge button is only advisory, but I'll accept this behavior to push me to prevent regressions. |
@jasonmp85 I like the analogy. Also "0.01%" or any seemingly small percentage might not be the right metric since in a code base of 100K relevant lines that'd still be 10 lines of potentially bug ridden code. Maybe we should specify the actual line #'s also, e.g.:
|
No need for pinging @GrahamCampbell ;) |
@nickmerwin I appreciate what you're saying about never decreasing coverage, however we use protobufs and I suspect it must be that (or bison or other bits we use elsewhere), but our coverage can end up going up or down even if all that's been changed are text files, e.g. OpenLightingProject/ola#610 or OpenLightingProject/ola#555 which will mean we'll get false positives if we can't set a threshold. I know we can ignore it, but then you're into the boy who cried wolf territory. |
You're measuring coverage on generated code? Kinda weird, IMO… On Tue, Feb 3, 2015 at 4:17 PM, peternewman [email protected]
|
@nickmerwin I'm not seeing this on my project… For instance, citusdata/pg_shard#72 was just pushed. It moves around just a few SQL files, so the coverage remained the same. I see the comment, but not the status. What's up? |
@jasonmp85 same here, I turned off the comments and no change. I've just tried turning off both sets, saving and re-enabling, so will see if that fixes it somehow. Regarding coverage of generated code, I see your point, TBH we had the tests already, I just gathered the test data and pushed it to coveralls. However given breaking the generated code will break the program, surely we want to confirm the tests cover the generated code well too, hence wanting good coverage? |
@jasonmp85 looking into that now; the GH API is returning a 404 error when attempting to create a status on that PR. |
@peternewman I'm just saying that coverage of generated code is irrelevant. Your tests should still fail if it breaks, which means the build will fail independent of Coveralls. I use protobufs for another project and don't know what dead code will be in the files it generates, so can't trust on instrumenting it for coverage… But if it breaks, the build will fail, so I'm OK. @nickmerwin There are a lot of people participating in this issue… should I open a new one, or take this to email, or? Tried to figure out what other support options existed but don't feel like making a ZenDesk password or whatever. |
@jasonmp85 ok I figured it out -- the public oauth scope Coveralls has always asked for doesn't include the ability to write commit statuses; now it does. Could you log out then log back in? |
That fixed it. The org needed that one extra permission, though it now also asked for essentially everything against my personal user. You guys should see whether that's a regression or something, but otherwise it's working great. |
@nickmerwin that fixed it for me too, it only asked for the commit status permission for me @jasonmp85 . The change has raised one issue though @nickmerwin . Is there an API function within Coveralls to tell it to tell GitHub that it's getting ready to generate some coverage stats? FWIW we use https://github.com/eddyxu/cpp-coveralls . It sort of looks like the parallel build stuff may be relevant. Anyway, our current timeline is something like this: So in an ideal world, it would be great to have a Coveralls API, so at the start of the Travis coverage job, it calls into there, which then calls into GitHub to say Coveralls pending, which will only leave it slightly out of sync with Travis, and reduce the chance of builds having that confusing grey area where Travis is green, and Coveralls isn't listed as pending. @jasonmp85 I take on board what your saying, and we're going to exclude the generated code from coverage, but playing devils advocate, if you don't have coverage of your generated code, how do you know if the tests are covering the bits you use and hence will fail if it breaks? |
@peternewman yes! cpp-coveralls will need to be updated to support the More info re: webhook here: https://coveralls.zendesk.com/hc/en-us/articles/203484329 |
@jasonmp85 did it ask for private repo read/write access? I've seen a similar report and it's odd because we've only added the request for "commit:status" to our OAuth scopes. Looking for clues. Thanks! |
Thanks @nickmerwin so the parallel option is the right choice and will achieve what I'm asking for even if we aren't interested in an actual parallel build? |
@peternewman I'm assuming so yes, but would love to hear what you find testing out that flow. Keep me posted, thanks! |
It asked for everything. Not for my org (that just showed a dialog asking Honestly I avoided doing anything about it for a few hours before —Jason On Mon, Feb 9, 2015 at 11:13 AM, Nick Merwin [email protected]
|
https://github.com/blog/1227-commit-status-api
http://developer.github.com/v3/repos/statuses/
Comments can get annoying...
The text was updated successfully, but these errors were encountered: