-
Notifications
You must be signed in to change notification settings - Fork 162
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
Coverband tries to report before reading config/coverband.rb resulting in error spam #420
Comments
For rails, putting in the classic |
@sirwolfgang Hmm doesn't work for me. The same file as above, just moved to initializers, still the same problem.
|
Assuming you only see this error when redis is not running at |
@kbaum Exactly. We don't have a local redis server, we use sentinels. There is a local one (sentinel) but it runs on :26379 |
Thanks @2called-chaos. Was able to reproduce and put together a quick fix on this branch: https://github.com/danmayer/coverband/compare/early_report_error Let me know if that works. |
good call if you all try that out we can get it merged in and cut a release |
thanks @kbaum |
That works like a charm (with config/coverband.rb). I personally don't care that much but throwing the idea in the room. Does coverband queue reports when unconfigured or connection failure? If not it either way didn't report some early stuff I suppose but I can't quite tell if But I guess easy for you to evaluate since you know the code a bit better. Thank you guys no matter what! 👍 |
Coverband does not do queue on report failures. Not sure if runtime/eager_load coverage would have been working in this case. If you look at your report and you see runtime coverage on class definitions or method definitions, you'll know that runtime vs eager load coverage was not working properly. Hope that helps! |
I think we broke something :< I have to investigate further as to why but this change introduced a weird bug that reproducibly happens with the early_report_error branch (was that only this change?) and version 5.1.1 We use delayed_job with MySQL and when using said versions a huge number of jobs (supposedly those that do DB queries) fail with the following error (seemingly in random queries that work in the website and prod console) Stack (reverse) until query (there is no coverband in stack):
|
Interesting. Looks so unrelated to the changes on that coverband branch. https://github.com/danmayer/coverband/pull/422/files Do you know what version of coverband you were previously on? Could do a diff against that. |
We pinned it to 5.1.0 which is what we used before and the problem goes away. It's really strange. I will try to recreate this in a basic app |
Ok sounds good. Thanks for the update! |
Describe the bug
In certain tasks (rails console, rake tasks like delayed_job:restart) we get "coverage failed to store" errors. Taking the rails console (via pry) example:
To Reproduce
I'm not quite sure if we do something odd but it should be reproducible with a Rails 6.1 app and a custom
config/coverband.rb
(andrails c
)Expected behavior
No reporting should be attempted before Redis config has been loaded.
It's not an issue per se but seeing "ERROR" in deployment output is always unsettling.
Additional context
My coverband.rb for reference
The text was updated successfully, but these errors were encountered: