Skip to content
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

Does coverband ignore downstream call stack if a path is ignored in config.ignore? #574

Open
harshanails opened this issue Jan 28, 2025 · 3 comments

Comments

@harshanails
Copy link

Just wondering if a bunch of cron workers are added to the ignore list, does the called substack/classes also be added to the ignore list or will they still show up in the runtime coverage?

More context here

@danmayer

@danmayer
Copy link
Owner

I believe this is just pretty naive regex ignoring so the underlying call stack and other code would still show up in the runtime coverage.

if everything is in a common subdirectory, you can pass regex to ignore an entire folder path... If you are trying to do something specific you can let me know and I can perhaps help, but the ignoring is a pretty simple filter layer to not store the data to redis or display it if it is already in redis.

@harshanails
Copy link
Author

If you are trying to do something specific you can let me know and I can perhaps help

@danmayer Yes, I am trying to see if any code path which matches a cron_worker and the classes loaded by these cron_workers can be excluded from being reported to ::Coverband.configuration.store.coverage(::Coverband::RUNTIME_TYPE)

@danmayer
Copy link
Owner

Ok, so I had an idea that might work for this... You can disable coverband on various processes. So if you have a cron job process, you could just disable coverband, and the job and all the code it loads / runs will then be excluded. You can disable it for the process by setting the COVERBAND_DISABLE_AUTO_START environment variable.

for example:
COVERBAND_DISABLE_AUTO_START=true bundle exec bin/cron_worker --job JobName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants