CI: Fix terminating a process in a docker#88567
Merged
maxknv merged 7 commits intoClickHouse:masterfrom Oct 17, 2025
Merged
Conversation
Contributor
Contributor
Author
|
I don't like calling |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the issue of terminating processes running inside Docker containers when a timeout is exceeded. The key improvement is adding a customizable shell cleanup command that runs before attempting to terminate the process, allowing proper container cleanup.
Key Changes:
- Added
timeout_shell_cleanupparameter to enable custom cleanup logic during timeout handling - Modified timeout handling to execute cleanup command before attempting SIGTERM/SIGKILL
- Set default cleanup command to remove Docker containers when jobs run in Docker
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ci/praktika/utils.py | Added timeout_shell_cleanup parameter to TeePopen class and modified _check_timeout method to execute cleanup command before termination signals |
| ci/praktika/runner.py | Passed timeout_shell_cleanup parameter from job configuration to TeePopen |
| ci/praktika/job.py | Added timeout_shell_cleanup field to job configuration and set default Docker container removal command in __post_init__ |
Contributor
Author
|
Here is a small note why I didn't just pass the docker container name to |
maxknv
reviewed
Oct 16, 2025
maxknv
reviewed
Oct 16, 2025
maxknv
approved these changes
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Not for changelog (changelog entry is not required)
Motivation: Fix CI: Job timeouts failed to terminate jobs running in docker #85444