Fix regression on trigger form error display on form validation #37672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During release tests of 2.8.2rc2 I realized a small regression on Trigger form UI in special conditions:
If the trigger form is submitted with invalid values, the rendering of the re-display of the form generates a stack trace display with "UndefinedError" - "jinja2.exceptions.UndefinedError: 'form' is undefined".
This can be caused by the user by:
required_field: null
) and try to submitAIRFLOW__WEBSERVER__SHOW_TRIGGER_FORM_IF_NO_PARAMS=True
is set, the DAG has required fields which are generating an invalid DAG run.Root cause is missing to supply the "form" value from a rework in PR #37497 where 1 line was deleted accidentially:
https://github.com/apache/airflow/pull/37497/files#diff-917b70d2661fae8322c538a4f60b9d4ba755556036fe0c527eb0411a6ac60f2eL2155
This PR adds the line such that the form can be rendered again.
Double checked and this is the only path where the
form
parameter was missing for rendering.