ashb commented on code in PR #69998:
URL: https://github.com/apache/airflow/pull/69998#discussion_r4228601216
##########
providers/databricks/src/airflow/providers/databricks/plugins/databricks_workflow.py:
##########
@@ -471,13 +509,45 @@ class WorkflowJobRepairSingleTaskLink(BaseOperatorLink,
LoggingMixin):
name = "Repair a single task"
+ @property
+ def operators(self):
+ # On Airflow 3 a plugin extra link that declares no ``operators`` is
replaced at
+ # deserialization by an ``XComOperatorLink`` that just returns a URL
the task stored in
+ # XCom under ``xcom_key``. This link stores no such URL — it builds
the URL at request time
+ # in ``get_link`` from the run's XCom metadata — so it must survive as
the real object.
+ # Declaring the operators it applies to keeps it from being swapped
out. Lazy import avoids
+ # a circular import with the operator module.
+ from airflow.providers.databricks.operators.databricks import (
+ DatabricksNotebookOperator,
+ DatabricksTaskOperator,
+ )
+
+ return [DatabricksNotebookOperator, DatabricksTaskOperator]
+
def get_link( # type: ignore[override] # Signature intentionally kept
this way for Airflow 2.x compatibility
self,
operator,
dttm=None,
*,
ti_key: TaskInstanceKey | None = None,
) -> str:
+ if AIRFLOW_V_3_0_PLUS:
+ # The Airflow-3 repair backend is only registered on 3.1.1+ (see
+ # DatabricksWorkflowPlugin), so render no link below that.
Review Comment:
Why only on 3.1.1? I can't see the reason that is needed?
--
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]