-
Notifications
You must be signed in to change notification settings - Fork 160
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
Controller file being unexpectedly ignored #347
Comments
Interesting try looking at what comes back from this in production rails console Coverband.configuration.store.coverage Also, might want to look to see if the underlying ruby coverage library is tracking it by executing this in production rails console: Coverage.peek_result |
hmmm this is pretty similar issue I just debugged in another PR, but that was related to the default If you have I don't believe it would be a name collision, but I can't rule that out. Any chance that the controller is hooked up to an authentication gem, like |
And
Same result if I try |
Hmmm.. When you start rails console make sure that coverband is getting started. Coverband should require the ruby coverage library. |
Coverband is loaded, guessing it is name space you could try Thanks for checking that, so the file is definitely not getting into Coverband... The peak_result would be helpful. Did you have anymore info if that control is used / tied to another gem that might get loaded before Coverband? |
Hmm, still no luck with the
Yes, that is a customized Devise controller, and we do have Coverband listed before devise in the |
If you have coverband required and started within that rails console, you should also have the Coverage class. By default, coverband will auto-start if required unless you explicitly disable auto-start with the environment variable. Can you try: Coverband.start
Coverage.peek_result |
or honestly... What about |
I suspect we were hoping for something more informative? |
ha yeah... I think what this shows @jagthedrummer is that Coverband doesn't startup the same way in IRB or Console... So it won't help us get to why that file is being skipped / loaded in an unexpected order. I am trying to think of ways to remote / async debug this. I have had to debug issues like this on some of my own apps, and I just drop a debugger in and run it in local development... If you are comfortable giving that a shot, I could try to write up a debugging step by step guide... Which shows where to add the debugger, how to limit it to the file in question, and how to determine if that file reaches Coverband or even reaches Let me know if you would try to run through the guide, if I took the time to write it up. |
Well, the weird thing (one of the weird things?) is that the file does show up in the Coverband data locally. It's only missing in prod. I'll spend a little time seeing if I can reproduce the problem in a review app, and if so then maybe I can drop in some logging calls to help us figure out what's going on. |
Interesting.. in my production |
We might have already asked, but is it Do you have any coverband related ENV vars set for console? The difference between development and production is also interesting most likely that is related to these settings which are different in dev and prod...
you could try to set those the same in your dev environment as production and see if that causes the same error locally... That would in theory isolate the issue to load order issues. |
It would be great. We have a similar problem in our production environment. |
I fell behind on various things and forgot to ever write up the debugging flow, to understand If anyone figured out their production issues please let me know. |
I ran into a similar issue but almost all of my code outside of This specific problem felt like an issue with the scout library so I filed an issue there: scoutapp/scout_apm_ruby#343 |
thanks folks I believe I fixed some issues between simplecov and coverband as well as resque, and hopefully the 5.0 release resolves any issues with missed files... @jagthedrummer / @yuriyalekseyev when you have time upgrade to Coverband 5.0 and let me know if you still see any issues like this. I don't think I can't solve the scout issue since it breaks Ruby's Coverage itself... Thanks for pionting that out @jasdeepgosal |
We have one particular controller file that is not showing up in our coverband reports and we're trying to figure out why.
I've looked at this, but it doesn't offer any clues:
The controller in question is
app/controllers/users/registrations_controller.rb
and coverage data for it IS generated locally, but not in production. And we know that it's used in production and handling traffic.We also have a file at
app/controllers/registrations_controller.rb
. (Yeah, I know, don't ask...) Is it possible that there's a name collision of some sort?Any suggestions for how to debug this since it's only happening in prod?
The text was updated successfully, but these errors were encountered: