rustikk opened a new issue #21982:
URL: https://github.com/apache/airflow/issues/21982


   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   When using the python operator on scheduled runs the task logs are repeating 
multiple times. This issue doesn't occur when using the web UI to trigger the 
dags
   ![Screen Shot 2022-03-03 at 4 11 19 
PM](https://user-images.githubusercontent.com/17841735/156668577-27fe0fd2-ae54-4240-8b17-f5eda940ad42.png)
   
   
   ### What you expected to happen
   
   I expected the task details for each task to show only one print out of that 
tasks logs
   
   ### How to reproduce
   
   ```
   from airflow.models import DAG
   from airflow.operators.python import PythonOperator
   
   from datetime import datetime, timedelta
   
   dag_name = "test_uri_generation"
   
   def dummy_check4bugs():
       pass
   
   with DAG(
       dag_id=dag_name,
       start_date=datetime(2021,1, 1),
       schedule_interval=timedelta(days=30, hours=12),
   ) as dag:
   
       t0 = PythonOperator(
           task_id="add_conn",
           #python_callable=add_conn,
           python_callable=dummy_check4bugs,
       )
   
       t1 = PythonOperator(
           task_id="check_uri_generation",
           #python_callable=check_uri_gen,
           python_callable=dummy_check4bugs,
       )
   t0 >> t1
   ```
   
   ### Operating System
   
   Docker
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Airflow Breeze
   
   ### Anything else
   
   This bug occurs every time though only on scheduled runs and the first dag 
that runs typically repeats the logs the most.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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