Open artem-shelkovnikov opened 6 months ago
Tried looking into it and it's really weird, feels like it's an interrupt that happens in a wrong moment.
Testing it a bit locally showed that the test does not interrupt because some services (in my case it was job cleanup service) did not exit.
I think it happens because SIGINT/SIGTERM happens in between service startup - e.g. Job Scheduling/Job Execution Services has just started, next Job Cleanup Service will attempt to start, but interrupt happens before and service just starts.
☝️ This info is just a theory, I was unable to prove or discard it.
I wonder if this is related to https://github.com/elastic/connectors/issues/2568
@seanstory I have a feeling it's the same issue.
It feels like CTRL+C in some particular place of code does not correctly trigger the cleanup and after cleanup was started some couroutines were still executed.
One unit test is flaky and from time to time takes too much time to run, causing CI to terminate the process:
bin/pytest tests/test_service_cli.py::test_shutdown_called_on_shutdown_signal