Skip to content
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

Added callback_file & callback_name to default_args DAG level and tests #218

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

subbota19
Copy link

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

  1. 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 are passed in Airflow. Additionally, I’ve included unit tests.

Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super helpful, @subbota19 , thank you very much for working on this!
I'm happy for us to merge this change once we confirm the tests are passing.

@subbota19
Copy link
Author

Hi @tatiana !
I've added another commit to address the failed fmt-check step. The code is now formatted correctly, could we please rerun the workflow one more time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants