astronomer / dag-factory

Dynamically generate Apache Airflow DAGs from YAML configuration files
Apache License 2.0
1.16k stars 176 forks source link

Increase project quality #206

Open pankajkoti opened 1 month ago

pankajkoti commented 1 month ago

Description co-authored by @tatiana @pankajastro

Scope:

matveykortsev commented 1 month ago

Guys add please support for on_failure_callback in this way:

from airflow.providers.slack.notifications.slack import send_slack_notification
'on_failure_callback': [
        send_slack_notification(
            slack_conn_id='slack',
            text="""
                :red_circle: Task Failed. 
                *Task*: {{ ti.task_id }}  
                *Dag*: {{ ti.dag_id }} 
                *Execution Time*: {{ ti.execution_date }}  
                *Log Url*: {{ ti.log_url }} 
                """,
            channel="analytics-alerts",
            username="Airflow",
        )
    ],

Now its only possible without params and only through absolute path for .py file.

pankajastro commented 1 month ago

Thank you, @matveykortsev, indeed, this feature would be valuable. I've created a high-level task https://github.com/astronomer/dag-factory/issues/200 to compare the missing issues like this.