Nick-Nal opened a new issue, #40932:
URL: https://github.com/apache/airflow/issues/40932

   ### Apache Airflow version
   
   2.9.3
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Greetings
   I've stumbled upon a problem and inconsistency with datetime-typed DAG params
   
   Let's take a DAG with datetime param that has a default value matching end 
of some day - 23:59:59.999999
   
   ```python
   "metrics_end_time": Param(
                   default = pendulum.now(tz = 
"UTC").first_of("quarter").end_of("day").subtract(days = 1).isoformat(),
                   type = "string",
                   format = 'date-time',
                   title = "metrics_end_time",
                   description = "Upper bound for general metrics calculation 
time period"
                   )
   ```
   
   It works just as expected for any scheduled runs, all fractions of the 
second passed correctly
   
   But if I want to trigger that same DAG manually from UI there's no way to 
launch it with preserving fractional part
   
![image](https://github.com/user-attachments/assets/7aa7abbb-9eea-4ae0-994b-a9b4b8e53cbc)
    
   Firstly, this param showing up in UI without any fractional part at all
   Secondly, even if fractional part will be typed in this field (as 
'2024-07-22T23:59:59.999999+00:00', for example) - value won't be saved, DAG 
will start with allballs in fractional part
   
   I'm understanding all workarounds, but it looks like an incosistency that 
shoud be fixed
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Try to manually run from UI any DAG with datetime param with fractional part 
in seconds - the fractional part will be missed
   
   ### Operating System
   
   Ubuntu 22.04
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### 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: commits-unsubscr...@airflow.apache.org.apache.org

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

Reply via email to