brouberol commented on issue #48418:
URL: https://github.com/apache/airflow/issues/48418#issuecomment-2757197054
Forget I said anything, this must have been a PEBKAC.
I was able to see extra links in the UI for mapped tasks with the following
setup, with airflow 2.10.5
```python
# plugins/pod_resources_grafana_link.py
import logging
from airflow.models.baseoperator import BaseOperator
from airflow.models.baseoperatorlink import BaseOperatorLink
from airflow.models.taskinstancekey import TaskInstanceKey
from airflow.plugins_manager import AirflowPlugin
class GrafanaDashboardKubernetesPodResourcesLink(BaseOperatorLink):
name = "Pod resources"
def get_link(self, operator: BaseOperator, *, ti_key: TaskInstanceKey):
return f"https://grafana.wikimedia.org/..."
class AirflowWikimediaDumpOperatorExtraLinkPlugin(AirflowPlugin):
name = "pod_resources_grafana_dashboard_link-changed"
operator_extra_links = [
GrafanaDashboardKubernetesPodResourcesLink(),
]
```
and a custom operator defined as such:
```python
from airflow.operators.python import PythonOperator
from extra_link import GrafanaDashboardKubernetesPodResourcesLink
logger = logging.getLogger(__name__)
class CustomPythonOperator(PythonOperator):
operator_extra_links = (GrafanaDashboardKubernetesPodResourcesLink(),)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]