python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 386 forks source link

chore: add a per test 3min timeout and enable color output #700

Closed bringhurst closed 7 months ago

bringhurst commented 1 year ago

Why is this needed?

It's difficult to reproduce, but I've seen the github actions test suite take more than 6 hours. Having a timeout set will allow us to get some sort of useful debug information instead of having github actions kill it off before we can analyze anything.

Proposed Changes

Does this PR introduce any breaking change?

No -- this is intended to help debug the test suite.

codecov-commenter commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (55f27b2) 96.76% compared to head (5bdd8ee) 96.79%. Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #700 +/- ## ========================================== + Coverage 96.76% 96.79% +0.02% ========================================== Files 27 27 Lines 3557 3557 ========================================== + Hits 3442 3443 +1 + Misses 115 114 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bringhurst commented 1 year ago

I keep seeing this error also (it appears to be a string returned from the codecov api):

Could not determine repo and owner

Setting codecov-actions to verbose doesn't seem to give any more details.

🤔

ceache commented 1 year ago

I think the timeout is ok.

If the tests did not complete in 1h, they are not going to complete ever.

On Sun, Jan 29, 2023, 16:17 Jon Bringhurst @.***> wrote:

I keep seeing this error also (it appears to be a string returned from the codecov api):

Could not determine repo and owner

🤔

— Reply to this email directly, view it on GitHub https://github.com/python-zk/kazoo/pull/700#issuecomment-1407772048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIFTHSG3HX2FDX6GV7XPXTWU3M6FANCNFSM6AAAAAAUKOK74U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

a-ungurianu commented 1 year ago

This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

I wonder if this is why you see the codecov things, as it tries leverage the Github App.

@ceache I don't have the rights to add the app. Do you know someone who does?

bringhurst commented 1 year ago

An example of this showing useful debug output:

https://github.com/python-zk/kazoo/actions/runs/4038897905/jobs/6943223749

It lets the pytest timeout (not github actions timeout) determine that the test failed and prints out a trace of all frames.

bringhurst commented 1 year ago

It looks like this job may time out -- https://github.com/python-zk/kazoo/actions/runs/4039044495/jobs/6943463553

If that works correctly (times out and shows stack traces), I'll open this up for review.

Edit: It looks like this shows a nice stacktrace.

StephenSorriaux commented 7 months ago

I have resurrected this PR and reduced the timeout from 1h to 3min since it is a per-test timeout.

@jeffwidman @a-ungurianu @ceache if you have some time to check it