<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.1.3</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">macosx</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow==1!2.1.3+astro.1<br>
apache-airflow-providers-amazon==2.1.0<br>
apache-airflow-providers-celery==2.0.0<br>
apache-airflow-providers-databricks==2.0.0<br>
apache-airflow-providers-ftp==2.0.0<br>
apache-airflow-providers-google==5.0.0<br>
apache-airflow-providers-http==2.0.0<br>
apache-airflow-providers-imap==2.0.0<br>
apache-airflow-providers-microsoft-mssql==2.0.0<br>
apache-airflow-providers-mysql==2.1.0<br>
apache-airflow-providers-opsgenie==2.0.0<br>
apache-airflow-providers-postgres==2.0.0<br>
apache-airflow-providers-sftp==2.1.0<br>
apache-airflow-providers-slack==4.0.0<br>
apache-airflow-providers-snowflake==2.1.0<br>
apache-airflow-providers-sqlite==2.0.0<br>
apache-airflow-providers-ssh==2.1.0</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Astronomer</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Astro version 2.1.3</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Recently upgraded the platform to 2.1.3 and observed issues with TriggerDagRunOperator Operator. The child dag object when triggered from parent dag is not showing the start time in the tree view.<br>
Also start time are showing up as null in dag_run table.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trigger_profile = TriggerDagRunOperator(
    task_id='trigger_profile', trigger_dag_id='child_dag'
)"><pre class="notranslate"><code class="notranslate">trigger_profile = TriggerDagRunOperator(
    task_id='trigger_profile', trigger_dag_id='child_dag'
)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/32855276/133961379-c95610ec-6d7a-492b-9aa1-6f3381d29ffd.png"><img src="https://user-images.githubusercontent.com/32855276/133961379-c95610ec-6d7a-492b-9aa1-6f3381d29ffd.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">ideally it should display timestamp.</p>
<h3 dir="auto">How to reproduce</h3>
<ul dir="auto">
<li>create two DAGS.</li>
<li>dag_main.py</li>
<li>dag_child.py</li>
<li>create an operator in dag_main.py</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trigger_dag_child = TriggerDagRunOperator(
  task_id='trigger_profile', trigger_dag_id='dag_child'"><pre class="notranslate"><code class="notranslate">trigger_dag_child = TriggerDagRunOperator(
  task_id='trigger_profile', trigger_dag_id='dag_child'
</code></pre></div>
)</li>
<li>check start time  in child dag</li>
</ul>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.1.1</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Scheduler regularly crashes with error messages like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MySQLdb._exceptions.IntegrityError: (1062, &quot;Duplicate entry 'some-ETL-2022-01-19 14:00:00.000000' for key 'dag_id'&quot;)                                                                                                                                
                                                                                                                                                                                                                                                             
The above exception was the direct cause of the following exception:                                                                                                                                                                                         
                                                                                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                                                           
  File &quot;/home/airflow/.local/bin/airflow&quot;, line 8, in &lt;module&gt;                                                                                                                                                                                               
    sys.exit(main())                                                                                                                                                                                                                                         
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py&quot;, line 40, in main                                                                                                                                                              
    args.func(args)                                                                                                                                                                                                                                          
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py&quot;, line 48, in command                                                                                                                                                     
    return func(*args, **kwargs)                                                                                                                                                                                                                             
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/cli.py&quot;, line 91, in wrapper                                                                                                                                                          
    return f(*args, **kwargs)                                                                                                                                                                                                                                
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/commands/scheduler_command.py&quot;, line 64, in scheduler                                                                                                                                   
    job.run()                                                                                                                                                                                                                                                
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/base_job.py&quot;, line 237, in run                                                                                                                                                         
    self._execute()                                                                                                                                                                                                                                          
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1303, in _execute                                                                                                                                              
    self._run_scheduler_loop()                                                                                                                                                                                                                               
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1396, in _run_scheduler_loop                                                                                                                                   
    num_queued_tis = self._do_scheduling(session)                                                                                                                                                                                                            
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1492, in _do_scheduling                                                                                                                                        
    self._create_dagruns_for_dags(guard, session)                                                                                                                                                                                                            
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py&quot;, line 76, in wrapped_function                                                                                                                                             
    for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs):                                                                                                                                                                  
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py&quot;, line 390, in __iter__                                                                                                                                                        
    do = self.iter(retry_state=retry_state)                                                                                                                                                                                                                  
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py&quot;, line 356, in iter                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                                                      
  File &quot;/usr/local/lib/python3.8/concurrent/futures/_base.py&quot;, line 437, in result                                                                                                                                                                           
    return self.__get_result()                                                                                                                                                                                                                               
  File &quot;/usr/local/lib/python3.8/concurrent/futures/_base.py&quot;, line 389, in __get_result                                                                                                                                                                     
    raise self._exception                                                                                                                                                                                                                                    
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py&quot;, line 85, in wrapped_function                                                                                                                                             
    return func(*args, **kwargs)                               
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1583, in _create_dagruns_for_dags                                                                                                                              
    self._create_dag_runs(query.all(), session)                                                                               
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py&quot;, line 1625, in _create_dag_runs                                                                                                                                      
    run = dag.create_dagrun(                                   
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py&quot;, line 67, in wrapper                                                                                                                                                      
    return func(*args, **kwargs)                               
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py&quot;, line 1796, in create_dagrun                                                                                                                                                 
    session.flush()                                            
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 2523, in flush                                                                                                                                                     
    self._flush(objects)                                       
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 2664, in _flush                                                                                                                                                    
    transaction.rollback(_capture_exception=True)                                                                             
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 68, in __exit__                                                                                                                                               
    compat.raise_(                                             
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py&quot;, line 178, in raise_                                                                                                                                                     
    raise exception                                            
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 2624, in _flush                                                                                                                                                    
    flush_context.execute()                                    
  File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 422, in execute        
...  "><pre class="notranslate"><code class="notranslate">MySQLdb._exceptions.IntegrityError: (1062, "Duplicate entry 'some-ETL-2022-01-19 14:00:00.000000' for key 'dag_id'")                                                                                                                                
                                                                                                                                                                                                                                                             
The above exception was the direct cause of the following exception:                                                                                                                                                                                         
                                                                                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                                                           
  File "/home/airflow/.local/bin/airflow", line 8, in &lt;module&gt;                                                                                                                                                                                               
    sys.exit(main())                                                                                                                                                                                                                                         
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main                                                                                                                                                              
    args.func(args)                                                                                                                                                                                                                                          
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command                                                                                                                                                     
    return func(*args, **kwargs)                                                                                                                                                                                                                             
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/cli.py", line 91, in wrapper                                                                                                                                                          
    return f(*args, **kwargs)                                                                                                                                                                                                                                
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/commands/scheduler_command.py", line 64, in scheduler                                                                                                                                   
    job.run()                                                                                                                                                                                                                                                
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/base_job.py", line 237, in run                                                                                                                                                         
    self._execute()                                                                                                                                                                                                                                          
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1303, in _execute                                                                                                                                              
    self._run_scheduler_loop()                                                                                                                                                                                                                               
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1396, in _run_scheduler_loop                                                                                                                                   
    num_queued_tis = self._do_scheduling(session)                                                                                                                                                                                                            
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1492, in _do_scheduling                                                                                                                                        
    self._create_dagruns_for_dags(guard, session)                                                                                                                                                                                                            
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 76, in wrapped_function                                                                                                                                             
    for attempt in run_with_db_retries(max_retries=retries, logger=logger, **retry_kwargs):                                                                                                                                                                  
  File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 390, in __iter__                                                                                                                                                        
    do = self.iter(retry_state=retry_state)                                                                                                                                                                                                                  
  File "/home/airflow/.local/lib/python3.8/site-packages/tenacity/__init__.py", line 356, in iter                                                                                                                                                            
    return fut.result()                                                                                                                                                                                                                                      
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result                                                                                                                                                                           
    return self.__get_result()                                                                                                                                                                                                                               
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result                                                                                                                                                                     
    raise self._exception                                                                                                                                                                                                                                    
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/retries.py", line 85, in wrapped_function                                                                                                                                             
    return func(*args, **kwargs)                               
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1583, in _create_dagruns_for_dags                                                                                                                              
    self._create_dag_runs(query.all(), session)                                                                               
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1625, in _create_dag_runs                                                                                                                                      
    run = dag.create_dagrun(                                   
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 67, in wrapper                                                                                                                                                      
    return func(*args, **kwargs)                               
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py", line 1796, in create_dagrun                                                                                                                                                 
    session.flush()                                            
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2523, in flush                                                                                                                                                     
    self._flush(objects)                                       
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2664, in _flush                                                                                                                                                    
    transaction.rollback(_capture_exception=True)                                                                             
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__                                                                                                                                               
    compat.raise_(                                             
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_                                                                                                                                                     
    raise exception                                            
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2624, in _flush                                                                                                                                                    
    flush_context.execute()                                    
  File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute        
...  
</code></pre></div>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">We would expect these errors not to occur. According to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="631215427" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/9148" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/9148/hovercard" href="https://github.com/apache/airflow/issues/9148">#9148</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="795056129" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/13925" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/13925/hovercard" href="https://github.com/apache/airflow/issues/13925">#13925</a> this issue should have been fixed a couple of versions ago.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">kubernetes</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-amazon==2.0.0
apache-airflow-providers-celery==2.0.0
apache-airflow-providers-cncf-kubernetes==2.0.0
apache-airflow-providers-docker==2.0.0
apache-airflow-providers-elasticsearch==2.0.1
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-google==4.0.0
apache-airflow-providers-grpc==2.0.0
apache-airflow-providers-hashicorp==2.0.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-microsoft-azure==3.0.0
apache-airflow-providers-mysql==2.0.0
apache-airflow-providers-odbc==2.0.0
apache-airflow-providers-postgres==2.0.0
apache-airflow-providers-redis==2.0.0
apache-airflow-providers-sendgrid==2.0.0
apache-airflow-providers-sftp==2.0.0
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==2.0.0
apache-airflow-providers-ssh==2.0.0
"><pre class="notranslate"><code class="notranslate">apache-airflow-providers-amazon==2.0.0
apache-airflow-providers-celery==2.0.0
apache-airflow-providers-cncf-kubernetes==2.0.0
apache-airflow-providers-docker==2.0.0
apache-airflow-providers-elasticsearch==2.0.1
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-google==4.0.0
apache-airflow-providers-grpc==2.0.0
apache-airflow-providers-hashicorp==2.0.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-microsoft-azure==3.0.0
apache-airflow-providers-mysql==2.0.0
apache-airflow-providers-odbc==2.0.0
apache-airflow-providers-postgres==2.0.0
apache-airflow-providers-redis==2.0.0
apache-airflow-providers-sendgrid==2.0.0
apache-airflow-providers-sftp==2.0.0
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==2.0.0
apache-airflow-providers-ssh==2.0.0

</code></pre></div>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Other 3rd-party Helm chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">deployed via <a href="https://artifacthub.io/packages/helm/airflow-helm/airflow/8.5.0" rel="nofollow">https://artifacthub.io/packages/helm/airflow-helm/airflow/8.5.0</a> to kubernetes cluster (kubernetes 1.18).</p>
<p dir="auto">Backend is a mariaDB (10.3.31)</p>
<p dir="auto">Docker image used as base image: apache/airflow:2.1.1-python3.8</p>
<p dir="auto">Additional python dependencies installed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="airflow-exporter==1.5.2
boto3==1.18.58
s3fs==0.4.*
pandas==1.3.3
sqlalchemy==1.3.18
sqlalchemy-redshift==0.8.2
smart_open[aws]==2.1.*
# Use PyMySQL as dialect to fix SSL connection error
PyMySQL==1.0.2"><pre class="notranslate"><code class="notranslate">airflow-exporter==1.5.2
boto3==1.18.58
s3fs==0.4.*
pandas==1.3.3
sqlalchemy==1.3.18
sqlalchemy-redshift==0.8.2
smart_open[aws]==2.1.*
# Use PyMySQL as dialect to fix SSL connection error
PyMySQL==1.0.2
</code></pre></div>
<p dir="auto">Relevant parts of the airflow configuration:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="airflow:
  config:
    # [core]
    AIRFLOW__CORE__PARALLELISM: &quot;24&quot;
    AIRFLOW__CORE__DAG_CONCURRENCY: &quot;20&quot;
    AIRFLOW__CORE__MAX_ACTIVE_RUNS_PER_DAG: &quot;1&quot;
    AIRFLOW__CORE__LOAD_EXAMPLES: &quot;False&quot;
    AIRFLOW__CORE__STORE_SERIALIZED_DAGS: &quot;False&quot;"><pre class="notranslate"><code class="notranslate">airflow:
  config:
    # [core]
    AIRFLOW__CORE__PARALLELISM: "24"
    AIRFLOW__CORE__DAG_CONCURRENCY: "20"
    AIRFLOW__CORE__MAX_ACTIVE_RUNS_PER_DAG: "1"
    AIRFLOW__CORE__LOAD_EXAMPLES: "False"
    AIRFLOW__CORE__STORE_SERIALIZED_DAGS: "False"
</code></pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto">Between 1 and 10 scheduler restarts per hour on average with the above error message.</p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>