GitHub user gbonazzoli edited a comment on the discussion: Versioning Problem 
of (likely badly written) Dynamically Created DAGS

@potiuk 

I made some tests and I found that the problem was caused by one clause in the 
`PythonOperator` definition:

`retry_delay=timedelta(minutes=randrange(5) + 1)`

after having set it up to a static formula:

`retry_delay=timedelta(minutes=1)`

the versioning mechanism is now OK, and Airflow do not increment version number 
hundreds of times a day.

**My opinion is**: 

- if you are reasoning like the "git command" this is an Airflow's "subtle" 
bug. 
- If you are reasoning looking at the final results of the "compiled dynamic 
code" this is the perfectly expected behaviour.

Actually if you talk to a developer about "code's versioning" I think that the 
common mindset is totally "git influenced".
So if we align Airflow to this mindset it is much simpler to explain and 
document the mechanism... but probably it is not so simple to implement it in 
the "dag-processor".

What do you think ?

GitHub link: 
https://github.com/apache/airflow/discussions/54348#discussioncomment-14079190

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to