You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dabla (via GitHub)" <gi...@apache.org> on 2026/02/01 16:48:55 UTC
Re: [PR] Fix rendering of template fields with start from trigger [airflow]
dabla commented on code in PR #55068:
URL: https://github.com/apache/airflow/pull/55068#discussion_r2751583581
##########
task-sdk/src/airflow/sdk/bases/operator.py:
##########
@@ -526,6 +526,10 @@ def apply_defaults(self: BaseOperator, *args: Any, **kwargs: Any) -> Any:
# Store the args passed to init -- we need them to support task.map serialization!
self._BaseOperator__init_kwargs.update(kwargs) # type: ignore
+ # Validate trigger kwargs
+ if hasattr(self, "_validate_start_from_trigger_kwargs"):
Review Comment:
I tried it but then then unit test of ssk operator failed du to this class:
```
# Essentially similar to airflow.models.baseoperator.BaseOperator
class FakeOperator(metaclass=BaseOperatorMeta):
def __init__(self, test_param, params=None, default_args=None):
self.test_param = test_param
def _set_xcomargs_dependencies(self): ...
```
This class uses the BaseOperatorMeta metaclass, but doesn't inherit the BaseOperator, thus doesn't have the _validate_start_from_trigger_kwargs method. I knew there was a reason why I added the check. Will add comment on this check why it's there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org