astronomer / dag-factory

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

Increase project quality #206

Closed pankajkoti closed 1 month ago

pankajkoti commented 4 months ago

Description co-authored by @tatiana @pankajastro

Scope:

matveykortsev commented 4 months 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 4 months 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.