Enforce project timeout on the analyzer operations
What does this MR do?
There is an issue where some analyzers run beyond the specified project timeout. Shared CI runners run each job under a different process group and when the timeout occurs, the team claims to send a SIGTERM
os signal and is followed by a SIGKILL
signal after 10 seconds to handle graceful shutdown. Although there are issues(CI or CD process does not receive SIGTERM on termination, another issue comment) stating that the signals are not triggered consistently, ending up running child jobs indefinitely.
However, this MR is an attempt to listen to the SIGTERM signal so that before moving to the subsequent stage(i.e, Analyze, Search, Convert and Serialize) of the run
operation, it checks if the SIGTERM
signal is received. If yes, then the run
job ceases the operation and returns a context-canceled error right away.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer