uranusjr opened a new pull request #21933: URL: https://github.com/apache/airflow/pull/21933
Instead of always using MagicMock to validate mapped arguments, this implements a more sophisticated protocol that allows an operator to implement a `validate_mapped_arguments` to provide custom validation logic. If an operator just wants to use `__init__` for validation, however, they can set a flag `mapped_arguments_validated_by_init` to get the behavior easily. (This does *not* use MagicMock, however, since any custom validation logic should be able to handle those on its own). The `validate_mapped_arguments` flag is currently only set on PythonOperator. It can likely be used on a lot more operators down the road. -- 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]
