Skip to content

Commit

Permalink
Changed all imports for dagrun_operator from operators to standard pr…
Browse files Browse the repository at this point in the history
…ovider.
  • Loading branch information
hardeybisey committed Nov 15, 2024
1 parent 4b7a2a4 commit e933d79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/serialization/serialized_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
log = logging.getLogger(__name__)

_OPERATOR_EXTRA_LINKS: set[str] = {
"airflow.operators.trigger_dagrun.TriggerDagRunLink",
"airflow.providers.standard.operators.trigger_dagrun.TriggerDagRunLink",
"airflow.sensors.external_task.ExternalDagLink",
# Deprecated names, so that existing serialized dags load straight away.
"airflow.sensors.external_task.ExternalTaskSensorLink",
Expand Down
4 changes: 3 additions & 1 deletion tests/operators/test_trigger_dagrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def assert_extra_link(self, triggered_dag_run, triggering_task, session):
)
.one()
)
with mock.patch("airflow.operators.trigger_dagrun.build_airflow_url_with_query") as mock_build_url:
with mock.patch(
"airflow.providers.standard.operators.trigger_dagrun.build_airflow_url_with_query"
) as mock_build_url:
triggering_task.get_extra_links(triggering_ti, "Triggered DAG")
assert mock_build_url.called
args, _ = mock_build_url.call_args
Expand Down

0 comments on commit e933d79

Please sign in to comment.