Skip to content

FTP callable download_all() fails when logging to Slack #77

@jayckaiser

Description

@jayckaiser

When the FTP callable download_all() fails and enters the exception clause, the following error is raised:

File "/home/airflow/code/ea_airflow_util/ea_airflow_util/callables/ftp.py", line 54, in download_all
    if slack_conn_id := context["dag"].user_defined_macros.get("slack_conn_id"):
                        ~~~~~~~^^^^^^^
KeyError: 'dag'

This code was originally copied from a Rally implementation and likely has not been updated in some time. We should replace this error-logging to Slack with one of the built-in Slack alert callables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions