danmayer / coverband

Ruby production code coverage collection and reporting (line of code usage)
https://github.com/danmayer/coverband
MIT License
2.46k stars 157 forks source link

Incompatible with bootsnap. #498

Closed konalegi closed 7 months ago

konalegi commented 7 months ago

Describe the bug It's not a really bug, but according the code below Coverband is not compatible with Bootsnap. https://github.com/Shopify/bootsnap/blob/main/lib/bootsnap/compile_cache/iseq.rb#L87.

I believe a lot of people are using Bootsnap these days and specifically in big projects. It will be nice to add this info to the "Known Issues" section.

Thanks!

danmayer commented 7 months ago

Thanks yeah this might be worth noting. I think bootsnap is mostly for development and coverband primarily is intended for production observability... I guess some use it to speed up deploys as well. I can't think of a real work around for this other than updating the docs as you mentioned.

Let me know if you have any other ideas otherwise I will update the docs

konalegi commented 7 months ago

@danmayer I've spent a lot of time trying to make it work together, but the only possibility that I've found is to start Coverband with enabled Coverage on the part of the hosts only. It might be the solution for others.

I think bootsnap is mostly for development and coverband primarily is intended for production observability... I guess some use it to speed up deploys as well

I don't agree here, since in modern env when a lot of stuff is running in containers and they dynamically brought up on increased traffic, start-up time becomes very important. We are using our application in k8s, and starting time is very important for the HPA (horizontal pod autoscaling), when we need to bring pods when the traffic starts increasing as fast as possible. For instance, our app with Coverband enabled starts in ~50s without it ~37s, which is pretty significant.

Let me know if you have any other ideas otherwise I will update the docs

Yeah, no other ideas, I agree that only we can do is to update docs and everyone will decide what is more important.

danmayer commented 7 months ago

fair enough, I know it helps with autscaling boot up. So 13 seconds can add some time to the warmup when additional app servers are needed.

I will call it out in the docs.

danmayer commented 7 months ago

updated the docs https://github.com/danmayer/coverband/commit/0b56b98949c39ea93f5e6e7cb5fbc5ef58b7c5cf