From ecaf8576ada19e5df78b502084266980cde6e182 Mon Sep 17 00:00:00 2001 From: Shahar Epstein <60007259+shahar1@users.noreply.github.com> Date: Fri, 29 Nov 2024 23:59:43 +0200 Subject: [PATCH] Remove internal api call decorator from trigger_dag.py (#44490) --- airflow/api/common/trigger_dag.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/airflow/api/common/trigger_dag.py b/airflow/api/common/trigger_dag.py index 6891cc1df7830..054e9a5c2acbc 100644 --- a/airflow/api/common/trigger_dag.py +++ b/airflow/api/common/trigger_dag.py @@ -22,7 +22,6 @@ import json from typing import TYPE_CHECKING -from airflow.api_internal.internal_api_call import internal_api_call from airflow.exceptions import DagNotFound, DagRunAlreadyExists from airflow.models import DagBag, DagModel, DagRun from airflow.models.dag_version import DagVersion @@ -108,7 +107,6 @@ def _trigger_dag( return dag_run -@internal_api_call @provide_session def trigger_dag( dag_id: str, @@ -124,12 +122,12 @@ def trigger_dag( Triggers execution of DAG specified by dag_id. :param dag_id: DAG ID + :param triggered_by: the entity which triggers the dag_run :param run_id: ID of the dag_run :param conf: configuration :param logical_date: date of execution :param replace_microseconds: whether microseconds should be zeroed :param session: Unused. Only added in compatibility with database isolation mode - :param triggered_by: the entity which triggers the dag_run :return: first dag run triggered - even if more than one Dag Runs were triggered or None """ dag_model = DagModel.get_current(dag_id)