Goroutine leak if initial eval process fail for some components
What's wrong?
local.file is starting some go routines on creation that are cleaned up when Run is canceled. The problem is that if an error happens in between (for example if the evaluation process fails), the goroutines are left hanging. Other components might have the same pattern. This is not a big problem in general because the process will exit and the OS will clean up the leaky goroutines but for testing it's a bit annoying.
Steps to reproduce
Run a test with a config that has a local.file component and another component that depends on it. The other component should have a wrong config that will fail the evaluation process. Use verifyNoGoroutineLeaks at the end of the test to see the leaky go routines
System information
No response
Software version
v39.2
Configuration
No response
Logs
No response