-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added callback_file & callback_name to default_args DAG level and tes…
…ts (#218) Hi astro team! This PR brings the following enhancements: 1) Unittest for DAG-Level Callback using parameters: **_on_success_callback_name_** & **_on_success_callback_file_** **_on_failure_callback_name_** & **_on_failure_callback_file_** [Astro instruction on how to apply these parameters](https://www.astronomer.io/docs/learn/dag-factory#step-4-optional-add-a-dag-level-callback) 2) While I find the existing callback feature useful which allows specifying callback code at any location, this PR takes it a step further by enabling callbacks to be specified within the DAG's _default_args_. With this enhancement, the callbacks will automatically propagate to the task level as well. This update aligns with how [default_args](https://airflow.apache.org/docs/apache-airflow/2.9.2/core-concepts/dags.html#default-arguments) are passed in Airflow. Additionally, I’ve included unit tests.
- Loading branch information
Showing
2 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters