You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/17 14:41:27 UTC
[GitHub] [airflow] ashb commented on issue #12309: TaskGroup does not support dynamically generated tasks
ashb commented on issue #12309:
URL: https://github.com/apache/airflow/issues/12309#issuecomment-1043020847
> the function for the resulting task will always have the same id
This isn't true @potiuk.
For example
```python
with DAG(dag_id='x'):
@task
def foo():
...
foo()
foo()
foo()
```
will result in tasks with IDs of `foo`, `foo__1`, `foo__2` etc, and is tested.
https://github.com/apache/airflow/blob/295efd36eac074578e4b54a69d71c2924984326d/tests/decorators/test_python.py#L308-L340
@sjacquot Also in that example is a test of doing this in a task group.
If it is not behaving, the first step would be to create a failing test case we can put in our unit tests.
--
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