This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new ecb332c0f5c [v3-2-test] refactor: word changed from DAG to Dag in
airflow-core/src/airflow/api (#66200) (#66214)
ecb332c0f5c is described below
commit ecb332c0f5c23a5da8bedacaebb4ea596c095421
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun May 3 21:42:30 2026 +0200
[v3-2-test] refactor: word changed from DAG to Dag in
airflow-core/src/airflow/api (#66200) (#66214)
(cherry picked from commit 72382b59106111135e1b784d3dc54e3b02ee0796)
Co-authored-by: hojeong park <[email protected]>
---
airflow-core/src/airflow/api/common/delete_dag.py | 10 +++++-----
airflow-core/src/airflow/api/common/mark_tasks.py | 20 ++++++++++----------
airflow-core/src/airflow/api/common/trigger_dag.py | 14 +++++++-------
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/airflow-core/src/airflow/api/common/delete_dag.py
b/airflow-core/src/airflow/api/common/delete_dag.py
index cf72aac4c36..91cd387e3ac 100644
--- a/airflow-core/src/airflow/api/common/delete_dag.py
+++ b/airflow-core/src/airflow/api/common/delete_dag.py
@@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-"""Delete DAGs APIs."""
+"""Delete Dags APIs."""
from __future__ import annotations
@@ -43,16 +43,16 @@ log = logging.getLogger(__name__)
@provide_session
def delete_dag(dag_id: str, keep_records_in_log: bool = True, session: Session
= NEW_SESSION) -> int:
"""
- Delete a DAG by a dag_id.
+ Delete a Dag by a dag_id.
- :param dag_id: the dag_id of the DAG to delete
+ :param dag_id: the dag_id of the Dag to delete
:param keep_records_in_log: whether keep records of the given dag_id
in the Log table in the backend database (for reasons like auditing).
The default value is True.
:param session: session used
:return count of deleted dags
"""
- log.info("Deleting DAG: %s", dag_id)
+ log.info("Deleting Dag: %s", dag_id)
running_tis = session.scalar(
select(models.TaskInstance.state)
.where(models.TaskInstance.dag_id == dag_id)
@@ -80,7 +80,7 @@ def delete_dag(dag_id: str, keep_records_in_log: bool = True,
session: Session =
cursor_result = cast("CursorResult", result)
count += cursor_result.rowcount
- # Delete entries in Import Errors table for a deleted DAG
+ # Delete entries in Import Errors table for a deleted Dag
# This handles the case when the dag_id is changed in the file
session.execute(
delete(ParseImportError)
diff --git a/airflow-core/src/airflow/api/common/mark_tasks.py
b/airflow-core/src/airflow/api/common/mark_tasks.py
index a656c00c7aa..62ce2600aab 100644
--- a/airflow-core/src/airflow/api/common/mark_tasks.py
+++ b/airflow-core/src/airflow/api/common/mark_tasks.py
@@ -65,7 +65,7 @@ def set_state(
:param downstream: Mark all siblings (downstream tasks) of task_id
:param future: Mark all future tasks on the interval of the dag up until
last logical date.
- :param past: Retroactively mark all tasks starting from start_date of the
DAG
+ :param past: Retroactively mark all tasks starting from start_date of the
Dag
:param state: State to which the tasks need to be set
:param commit: Commit tasks to be altered to the database
:param session: database session
@@ -82,10 +82,10 @@ def set_state(
for dag in (task[0].dag if isinstance(task, tuple) else task.dag for
task in tasks)
}
if len(task_dags) > 1:
- raise ValueError(f"Received tasks from multiple DAGs: {task_dags}")
+ raise ValueError(f"Received tasks from multiple Dags: {task_dags}")
dag = next(iter(task_dags.values()))
if dag is None:
- raise ValueError("Received tasks with no DAG")
+ raise ValueError("Received tasks with no Dag")
if not run_id:
raise ValueError("Received tasks with no run_id")
@@ -224,9 +224,9 @@ def set_dag_run_state_to_success(
Set for a specific logical date and its task instances to success.
- :param dag: the DAG of which to alter state
+ :param dag: the Dag of which to alter state
:param run_id: the run_id to start looking from
- :param commit: commit DAG and tasks to be altered to the database
+ :param commit: commit Dag and tasks to be altered to the database
:param session: database session
:return: If commit is true, list of tasks that have been updated,
otherwise list of tasks that will be updated
@@ -283,9 +283,9 @@ def set_dag_run_state_to_failed(
Set for a specific logical date and its task instances to failed.
- :param dag: the DAG of which to alter state
- :param run_id: the DAG run_id to start looking from
- :param commit: commit DAG and tasks to be altered to the database
+ :param dag: the Dag of which to alter state
+ :param run_id: the Dag run_id to start looking from
+ :param commit: commit Dag and tasks to be altered to the database
:param session: database session
:return: If commit is true, list of tasks that have been updated,
otherwise list of tasks that will be updated
@@ -371,9 +371,9 @@ def __set_dag_run_state_to_running_or_queued(
"""
Set the dag run for a specific logical date to running.
- :param dag: the DAG of which to alter state
+ :param dag: the Dag of which to alter state
:param run_id: the id of the DagRun
- :param commit: commit DAG and tasks to be altered to the database
+ :param commit: commit Dag and tasks to be altered to the database
:param session: database session
:return: If commit is true, list of tasks that have been updated,
otherwise list of tasks that will be updated
diff --git a/airflow-core/src/airflow/api/common/trigger_dag.py
b/airflow-core/src/airflow/api/common/trigger_dag.py
index 3e8e1774ba2..67b3531fab3 100644
--- a/airflow-core/src/airflow/api/common/trigger_dag.py
+++ b/airflow-core/src/airflow/api/common/trigger_dag.py
@@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-"""Triggering DAG runs APIs."""
+"""Triggering Dag runs APIs."""
from __future__ import annotations
@@ -56,10 +56,10 @@ def _trigger_dag(
session: Session = NEW_SESSION,
) -> DagRun | None:
"""
- Triggers DAG run.
+ Triggers Dag run.
- :param dag_id: DAG ID
- :param dag_bag: DAG Bag model
+ :param dag_id: Dag ID
+ :param dag_bag: Dag Bag model
:param triggered_by: the entity which triggers the dag_run
:param run_type: the type of dag run (default: MANUAL)
:param triggering_user_name: the user name who triggers the dag_run
@@ -87,7 +87,7 @@ def _trigger_dag(
if min_dag_start_date and logical_date < min_dag_start_date:
raise ValueError(
f"Logical date [{logical_date.isoformat()}] should be >=
start_date "
- f"[{min_dag_start_date.isoformat()}] from DAG's
default_args"
+ f"[{min_dag_start_date.isoformat()}] from Dag's
default_args"
)
coerced_logical_date = timezone.coerce_datetime(logical_date)
data_interval: DataInterval | None =
dag.timetable.infer_manual_data_interval(
@@ -147,9 +147,9 @@ def trigger_dag(
session: Session = NEW_SESSION,
) -> DagRun | None:
"""
- Triggers execution of DAG specified by dag_id.
+ Triggers execution of Dag specified by dag_id.
- :param dag_id: DAG ID
+ :param dag_id: Dag ID
:param triggered_by: the entity which triggers the dag_run
:param run_type: the type of dag run (default: MANUAL)
:param triggering_user_name: the user name who triggers the dag_run