Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove internal api call decorator from trigger_dag.py #44490

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions airflow/api/common/trigger_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -108,7 +107,6 @@ def _trigger_dag(
return dag_run


@internal_api_call
@provide_session
def trigger_dag(
dag_id: str,
Expand All @@ -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)
Expand Down