jens-scheffler-bosch opened a new pull request, #31301: URL: https://github.com/apache/airflow/pull/31301
closes: #31299 This PR relaxes the DAG validation at parse time for JSON Param validation for DAGs which are triggered manual. For a manual triggered DAG the `params` are validated at time of trigger. This makes the current `DAG` class constructor/`__init__()` validation consistent with the DAG parsing validation. which allows: - Define required `params` for manually triggered DAGs w/o default values - to enforce users to really provide a value (w/o just hitting "Trigger" button and run a flow by accident with a bad default) - Preventing to Trigger a DAG w/o using the form or valid paramters Effects of change of this PR: - The Tutorial is adjusted - and can only be triggered via Form as a default value is missing - Documentation is adjusted in this regards - All `params`validations for scheduled DAGs keep the same as valid `params` are needed for automated schduling (Note: PR https://github.com/apache/airflow/pull/30706 adjusts the `can_run` to be consistent for scheduled only DAGs to be `can_be_scheduled` else data triggered and once triggered DAGs will fail in bad parameters) How to test? - The "example_params_ui_tutorial" is alos possible to be parsed w/o required filed defaults (See bug report) - Try to trigger the "example_params_ui_tutorial" DAG manual w/o params and see an error and the form populated as missing default - Try to trigger the form w/o filling required field, validation in form will block you - Enter some data into form and see it runs happily -- 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]
