molcay commented on PR #37087:
URL: https://github.com/apache/airflow/pull/37087#issuecomment-1934218563

   > I am not sure I agree. Rest API can invoke dag manually or also with some 
external service that invoke dags periodically. From business point of view it 
can be considered also as manual or scheduled operation thus I am worried about 
confusion. We should consider how to address this as part of this PR (not 
neccerly implementing it but have a clear vision of what we want to do) mainly 
because once a decision has been made it will be harder (and sometimes 
impossible) to change it without making breaking change
   
   Hi @eladkal,
   
   I am new to the airflow community, so I probably missing a lot of 
information. To be have more understanding on my side and also for the sake of 
the all community we can try to use this opportunity to have more clear vision.
   
   Let's start with adding description and use cases to current 
[`DagRunType`](https://github.com/apache/airflow/blob/main/airflow/utils/types.py#L51-L54):
   | `DagRunType`               | Description   | Usage                         
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
        |
   |---------------------       |-------------  
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      |
   | `BACKFILL_JOB`             | TBF           | - 
[Backfill](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dag-run.html#backfill)
 command: `airflow dags backfill`                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
               |
   | `SCHEDULED`                | TBF           | - [Airflow 
Scheduler](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/scheduler.html#scheduler):
 `airflow scheduler`                                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                  |
   | `MANUAL`                   | TBF           | - Using the "Trigger DAG" 
button on the UI<br>- Using the 
[`TriggerDagRunOperator`](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/operators/trigger_dagrun/index.html#airflow.operators.trigger_dagrun.TriggerDagRunOperator)
 inside of a DAG<br>- REST API calls to the [`POST /dags/{dag_id}/dagRuns` 
endpoint](https://github.com/apache/airflow/blob/main/airflow/api_connexion/endpoints/dag_run_endpoint.py#L312):
 can be called by **manually** (curl, Postman, etc.) or by the **other code as 
business logic**<br>- 
[trigger](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dag-run.html#external-triggers)
 command: `airflow dags trigger`       |
   | `DATASET_TRIGGERED`        | TBF           | - [Airflow 
Scheduler](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/scheduler.html#scheduler):
 `airflow scheduler`                                                            
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                  |
   
   > We can fill the description field to document it.
   
   When I look at the above table, the current run types (other than the 
`MANUAL`) is clear and if I see a log I can easily say which one is which one. 
However, for the `MANUAL` run type, we have so much options. I think we need a 
way to distinguish these different type of triggers. Maybe adding a new DAG run 
type is not the way but I am not sure what else we can do.


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