molcay commented on code in PR #39165:
URL: https://github.com/apache/airflow/pull/39165#discussion_r1592365881


##########
airflow/utils/types.py:
##########
@@ -72,3 +72,18 @@ class EdgeInfoType(TypedDict):
     """Extra metadata that the DAG can store about an edge, usually generated 
from an EdgeModifier."""
 
     label: str | None
+
+
+class DagRunTriggeredByType(str, enum.Enum):
+    """Class with TriggeredBy types for DagRun."""
+
+    CLI = "cli"  # for the trigger subcommand for dag command in cli: airflow 
dags trigger
+    OPERATOR = "operator"  # for the TriggerDagRunOperator
+    REST_API = "rest_api"  # for triggering the DAG via RESTful API
+    UI = "ui"  # for clicking the `Trigger DAG` button
+    TEST = "test"  # for dag.test()
+    SCHEDULER = "scheduler"  # for scheduler

Review Comment:
   Actually, I was thinking that the `SCHEDULER` value is for timetable related 
triggering and `DATASET` value is for Dataset related triggering. 
   I saw [this 
image](https://airflow.apache.org/docs/apache-airflow/stable/_images/dataset-scheduled-dags.png)
 on [the 
documentation](https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/datasets.html)
 and it states "Triggered by Datasets" so I was thinking the `DATASET` is a 
good value for this.



-- 
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]

Reply via email to