-
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
Trigger Button - Implement Part 2 of AIP-50 #31583
Trigger Button - Implement Part 2 of AIP-50 #31583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, tested locally and working nicely :)
@@ -1963,6 +1962,7 @@ def trigger(self, session: Session = NEW_SESSION): | |||
form_fields[k]["schema"]["custom_html_form"] = Markup( | |||
form_fields[k]["schema"]["custom_html_form"] | |||
) | |||
ui_fields_defined = any("const" not in f["schema"] for f in form_fields.values()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this check is not self explanatory. Took me a while to realize that we are looking for at least 1 field that is not a constant to display the UI form. Maybe a comment could help, or directly checking against the dag.params
values. (Here we check against UI elements that will potentially not be displayed to know if we should display them, also we construct all of these constants UI elements to no display them, which is not great)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the comment now to the other open PR for better understanding in code in https://github.com/apache/airflow/pull/31301/files#diff-917b70d2661fae8322c538a4f60b9d4ba755556036fe0c527eb0411a6ac60f2eR2011
Oh, the PR is now merged a bit too early :-(
Will this change then also move into 2.6.2 or be in 2.7.0? How are changes/fixes selectively applies to maintenance versions? |
Oh yes, right, forgot the 'merge 31301 before' part :(. I believe this is a small enough UI only change to be incorporated in 2.6.2 in 'miscellanous' section. We often have such quality of life UI improvement in patch release. (even if strictly speaking those could be considered as improvement). Marking this for 2.6.2, also it will help not delaying 31301. Sorry for the inconvenience |
(cherry picked from commit 3bcaf3d)
How to trigger a Dag w/ config after this PR? I cannot access the config UI if my dag doesn't have params, is it an expected behavior? |
Yes, it was expected. Was discussed in devlist and voted (with not much response but at least some) in https://lists.apache.org/thread/4dkbwob1wyl3xjbqdsmbd1mvgzflzp1f |
Thank you for the clarification. IMHO this is almost a breaking change, DagRun conf is not deprecated, and a lot of users still use it to parameterize their dag runs without defining the params. Removing the only way to provide the conf dict via the UI is a blocker for these users. Even if we still can provide conf via the REST API and the python API, most of the users use the UI to manage Airflow DAGs and DagRuns. |
closes: AIP-50 Project
related: #31301
This PR implements Part 2 of AIP-50 and once merged closes the AIP-50 improvement.
In this PR the behavior of the Trigger Button is changed to Option B as discussed in https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-50+Trigger+DAG+UI+Extension+with+Flexible+User+Form+Concept and voted in https://lists.apache.org/thread/4dkbwob1wyl3xjbqdsmbd1mvgzflzp1f
Changes in this PR:
Note: This code touches also parts from PR #31301 - PR #31301 should be merged and this revised before merge
How to test?
[ ] Merge PR #31301 before this one.