This is an automated email from the ASF dual-hosted git repository.
dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d264a8616ff Disable starting a mapped task from trigger (#48006)
d264a8616ff is described below
commit d264a8616ff79b0ca6d2fcb2c0140695314db910
Author: Daniel Standish <[email protected]>
AuthorDate: Mon Mar 24 09:13:14 2025 -0700
Disable starting a mapped task from trigger (#48006)
The scheduler versions of "ExpandInput" classes don't have a "resolve"
method anymore so scheduler crashes when trying to expand_start_from_trigger.
To keep the scheduler running, for now we disable the feature.
Related to https://github.com/apache/airflow/issues/47735
May be fixed in https://github.com/apache/airflow/issues/48009
---
airflow-core/src/airflow/models/mappedoperator.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/airflow-core/src/airflow/models/mappedoperator.py
b/airflow-core/src/airflow/models/mappedoperator.py
index 9b0b90b5814..34753a82e3e 100644
--- a/airflow-core/src/airflow/models/mappedoperator.py
+++ b/airflow-core/src/airflow/models/mappedoperator.py
@@ -20,6 +20,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import attrs
+import structlog
from airflow.models.abstractoperator import AbstractOperator
from airflow.sdk.definitions.mappedoperator import MappedOperator as
TaskSDKMappedOperator
@@ -31,6 +32,8 @@ if TYPE_CHECKING:
from airflow.sdk.definitions.context import Context
+log = structlog.get_logger()
+
@attrs.define(
kw_only=True,
@@ -57,6 +60,13 @@ class MappedOperator(TaskSDKMappedOperator,
AbstractOperator): # type: ignore[m
:meta private:
"""
+ if self.partial_kwargs.get("start_from_trigger",
self.start_from_trigger):
+ log.warning(
+ "Starting a mapped task from triggerer is currently
unsupported",
+ task_id=self.task_id,
+ dag_id=self.dag_id,
+ )
+ return False
# start_from_trigger only makes sense when start_trigger_args exists.
if not self.start_trigger_args:
return False