uranusjr commented on issue #19903: URL: https://github.com/apache/airflow/issues/19903#issuecomment-1005535302
Oh I see what’s going on. This has nothing to do with the task function, but the task _group_ function. Currently, the `@task_group` decorator is intended to be used like this: https://github.com/apache/airflow/blob/e8b5ab9efe93f826a2b521b5d1cac0404354c3b4/airflow/example_dags/example_task_group_decorator.py#L60-L63 Note how the task group function returns `task_3(...)`, which produces a BaseOperator. In your example, however, the task group function does not return anything, i.e. implicitly returns None. This means `start() >> do_all_things()` becomes `DummyOperator(...) >> None`, which fails with the exception. However, I don’t think the existing function-chaining syntax suits the need here, since `do_thing(1)` and `do_thing(2)` are supposed to be independent (and both depend on `start()` and depended by `end()`). So we need to extend the `@task_group` decorator a bit to make this work. -- 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]
