amit-mittal opened a new issue, #56319:
URL: https://github.com/apache/airflow/issues/56319

   ### Description
   
   Using below `Param` with default value as today's date as mentioned in the 
[official 
doc](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/params.html#use-params-to-provide-a-trigger-ui-form)
 will create a new DAG version as part of every run on a different day.
   ```
   Param(f"{datetime.date.today()}", type="string", format="date")
   ```
   
   The issue gets even worse if you accidentally use `time.time()` as the 
default parameter.
   
   We should also add a `ruff lint` check to catch this.
   
   ### Use case/motivation
   
   - Avoid accidental version creation as `serialized_dag` table can become 
really heavy
   - Official docs recommend this, but I think either it shouldn't create a 
version or there should be some other best practice for dates
   
   
   ### Related issues
   
   A lot of versions get created for the DAG even though engineer didn't update 
DAG's code
   
   ### Are you willing to submit a 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