galafis commented on issue #56149: URL: https://github.com/apache/airflow/issues/56149#issuecomment-4068232498
It looks like this hasn't been picked up yet. I reviewed the `on_kill` method in `providers/docker/src/airflow/providers/docker/operators/docker.py` and confirmed the issue — when `auto_remove='force'` is set, `on_kill` only calls `self.cli.stop(container=self.container['Id'])` without following up with container removal. The fix is straightforward: after `self.cli.stop()`, check if `self.auto_remove == 'force'` and call `self.cli.remove_container(container=self.container['Id'], force=True)`. This mirrors what happens in the normal execution path when the container exits successfully. I'll submit a PR with the fix and a unit test covering the on_kill + auto_remove='force' scenario. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
