-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: New trigger DAG with config form doesn’t allow valid floats and empty strings #31930
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Thanks for reporting this bug - and as Part 1 is already fixed with a PR let me answer on the others. Regarding Part 2) Empty strings are converted to Regarding Part 3) The implementation of the user form was made in mind that the form fields generate the actual JSON dict which is used to trigger the DAG. It was included in the form because it was just a dict before and for the case you want to manually inspect or tune what is being submitted (or like in your case if you find a problem that you are not blocked). For power user it is a way that you can copy&paste a previous JSON you might have captured from the past. It was not intended to be a 2-way sync back if you modify the JSON back to form fields. This might be a bit more complex to be implemented. I feared (when I contributed the code) this might be a bit over-kill and additional complexity generates more bugs. But if you like to contribute and feel this would be a good feature please feel free to open a PR to contribute. Therefore I assume the bug is resolved, if you have a different opinion, please re-open. |
@jens-scheffler-bosch Actually I think we can improve the second part, for that I didn't closed the issue after fixing the first part. |
This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author. |
This issue has been closed because it has not received response from the issue author. |
Apache Airflow version
2.6.1
What happened
There are two problems with new form which forms DAG config.
1. It doesn't allow to fill valid float with two or two decimal places
This param in DAG code looks like:
Param(default=None, type=["number", "null"]
But in form we get:
2. It doesn't considers empty string as filled parameter
'param1': Param(default='', type='string')
3. There is some strange behavior in interaction between filled form and "Generated Configuration JSON"
This helped us to overcome problem from p.1 and p.2, but it seems not very reliable, probably parameters in form should be synced with JSON.
What you think should happen instead
Problem 1: field allows to fill proper float values.
Problem 2: field don't need to be filled
Problem 3: values in JSON synced with values in form
How to reproduce
Problem 1:
0.01
into this param field in Trigger DAG with config formProblem 2:
Param(default='', type="string"
Problem 3:
Operating System
MacOS
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: