Using this as a reference: Define an operator extra link — Airflow Documentation
I can not get links to show in the UI. I have tried adding the link within the operator itself and building the seperate extra_link.py file to add it and i never see the link be added to task in grid or graph view. Here is my code for creating it in the operator:
class upstream_link(BaseOperatorLink):
"""Create a link to the upstream task"""
name = "Test Link"
def get_link(self, operator, *, ti_key):
return "https://www.google.com"
# Defining the plugin class
class AirflowExtraLinkPlugin(AirflowPlugin):
name = "integration_links"
operator_extra_links = [
upstream_link(),
]
class BaseOperator(BaseOperator, SkipMixin, ABC):
""" Base Operator for all integrations """
operator_extra_links = (upstream_link(),)
This is a custom BaseOperator class used by a few DAGs in my deployment. I don’t know if the inheritance is causing the issue or not. Any help would be greatly appreciated.
EDIT: The goal is to have this on mapped tasks, this does work with mapped tasks right?