leozitor commented on issue #16610:
URL: https://github.com/apache/airflow/issues/16610#issuecomment-1777677946

   Hey guys is anyone facing issues regarding this, I notices in my code that 
if i have a TriggerDagRunOperator inside task_group like this, it shows the dag 
dependency on viewer
   ```
   @task_group(group_id='concat_video')
       def concatenate_video(task_id: int):
           print("triggering job")
           submit_job = TriggerDagRunOperator(
               task_id='submit_job',
               trigger_dag_id='video_concatenation_job',
               wait_for_completion=True,
               deferrable=True,
   
               poke_interval=10,
               conf={
                       'task_id': task_id,
                   },
               )
   
           submit_job
   ```
   ![Screenshot from 2023-10-24 
10-11-57](https://github.com/apache/airflow/assets/2281027/c9dce9cd-53f7-4a22-a450-3dc64e43c13f)
   
   but if I use without a task_group ( for this example doesn't make sense to 
use a group for a unique task)
   it doesn't show in dag dependency viewer 
   ```   
   @task
   def concatenate_video(task_id: int):
            print("triggering job")
            submit_job = TriggerDagRunOperator(
             task_id='submit_job',
             trigger_dag_id='video_concatenation_job',
             wait_for_completion=True,
             deferrable=True,
             # max_active_tis_per_dag=2, # it may be used if not deferrable
             poke_interval=10,
             conf={
                     'task_id': task_id,
                 },
             )
   
         submit_job
   ```
   Does this make a sense?


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to