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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]