ashb commented on code in PR #65590:
URL: https://github.com/apache/airflow/pull/65590#discussion_r3116638326
##########
airflow-core/src/airflow/triggers/base.py:
##########
@@ -192,6 +192,51 @@ async def cleanup(self) -> None:
and handle it appropriately (in async-compatible way).
"""
+ async def get_task_state(self) -> TaskInstanceState | None:
Review Comment:
Yeah, we already have this message type we pass from the Triggerer job
runnner:
```python
class TriggerStateSync(BaseModel):
type: Literal["TriggerStateSync"] = "TriggerStateSync"
to_create: list[workloads.RunTrigger]
to_cancel: set[int]
```
I _think_ everything in that `to_cancel` list is because of user action, and
in that case we could pass a special message (object?) to `async_task.cancel()`
which I think will get exposed as the msg param on the CancelledError raised
inside the async code.
--
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]