vemikhaylov commented on code in PR #28667:
URL: https://github.com/apache/airflow/pull/28667#discussion_r1059802850
##########
airflow/cli/commands/task_command.py:
##########
@@ -560,6 +561,9 @@ def task_test(args, dag=None):
if args.task_params:
passed_in_params = json.loads(args.task_params)
task.params.update(passed_in_params)
+ if isinstance(task, DecoratedOperator):
+ task.op_args = []
+ task.op_kwargs.update(passed_in_params)
Review Comment:
I'm not 100% sure that this is the best place to override this. Probably the
args should rather be overridden somewhere closer to `execute` (e.g.,
https://github.com/apache/airflow/blob/main/airflow/operators/python.py#L174).
I lack clear understanding what `params` are / should be used for as opposed
to `op_args` and `op_kwargs`, so overriding here looked like a safer change to
me.
--
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]