pierrejeambrun commented on code in PR #53346:
URL: https://github.com/apache/airflow/pull/53346#discussion_r2213201733
##########
airflow-core/docs/core-concepts/dag-run.rst:
##########
@@ -260,6 +260,28 @@ Example of a parameterized DAG:
**Note**: The parameters from ``dag_run.conf`` can only be used in a template
field of an operator.
+Wait for a DAG Run
+------------------
+
+Airflow provides an experimental API to **wait for a DAG run to complete**.
This is particularly useful when integrating Airflow into external systems or
automation pipelines that need to pause execution until a DAG finishes.
+
+The endpoint blocks (by polling) until the specified DAG run reaches a
terminal state: ``success``, ``failed``, or ``canceled``.
+
+This endpoint streams responses using the **NDJSON (Newline-Delimited JSON)**
format. Each line in the response is a JSON object representing the state of
the DAG run at that moment.
+
+For example:
+
+.. code-block:: none
+
+ {"state": "running"}
+ {"state": "success", "results": {"op": 42}}
+
+This allows clients to monitor the run in real time and optionally collect
XCom results from specific tasks.
+
+.. note::
+
+ This feature is **experimental** and may change or be removed in future
Airflow versions.
Review Comment:
It's ok, that's not really what I had in mind because I find the endpoint
docstring not super descriptive but we can go like this, thanks @Bowrna
--
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]