apache / apache/airflow

Apply warm shutdown across coordinators

Open
#69,188 0 comments 0 reactions 1 assignee Claimed by @uranusjr View on GitHub
area:coordinator area:core kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

### Body

Python coordinator implements this in #69034. We should make this also available for other coordinators.

A small-scale refactoring to move the context manager to ActivityProcess so we can do something like:

```python
class ActivitySubprocess:
@classmethod
def run(cls, **kwargs):
with _warm_shutdown_signals():
self = cls.start(**kwargs)
exit_code = self.wait()
return exit_code, self
```

and just use this instead of calling things separately. All coordinators can switch to use this new function. Language side shoould be fine as-is; dedicated signal handling improvements can be made but they are not specific to this.

### Committer

- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.