uranusjr commented on issue #19836:
URL: https://github.com/apache/airflow/issues/19836#issuecomment-981828727


   > I think there's actually a single DAG that runs all pipelines,
   
   Ah!
   
   SubDAGs are DAGs that belong to another DAG, created with SubDagOperator: 
https://www.astronomer.io/guides/subdags
   
   I’m guessing your abstraction layer is implemented exactly with this—the 
top-level DAG creates a task for each of the DAGs you create through the layer, 
and those DAGs (except the top one) are actually subDAGs from Airflow’s 
perspective.
   
   From my code search, there is one single possible code path that would set a 
DAG run’s state to skipped. If a SubDagOperator task is skipped, the task 
scheduler would set its state to skipped (obviously), and *the operator would 
also set its controlling subDAG’s state to `SKIPPED`*.
   
   This is the exact function that does it:
   
   
https://github.com/apache/airflow/blob/c4e8959d141512226a994baeea74d5c7e643c598/airflow/api/common/experimental/mark_tasks.py#L195-L210
   
   This function is only called by `get_subdag_runs`, which is only called by 
`set_state` (all in the same module), which is used to set a task instance’s 
state.
   
   A DAG run can only be `QUEUED`, `RUNNING`, `SUCCESS`, or `FAILED`. I think 
setting the state to `FAILED` makes the most sense in this case?
   


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