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 2023/01/03 07:19:12 UTC
[GitHub] [airflow] uranusjr commented on issue #28535: Dynamic Task Mapping: No tasks are mapped, although the list to be mapped is not empty
uranusjr commented on issue #28535:
URL: https://github.com/apache/airflow/issues/28535#issuecomment-1369456393
I simplified the DAG to this bare minimum and it ran fine for me:
```python
from datetime import datetime
from airflow.decorators import task
from airflow.models import DAG, BaseOperator
class CustomOperator(BaseOperator):
def __init__(self, task_id, app_task_id, **kwargs):
super(CustomOperator, self).__init__(task_id=task_id, **kwargs)
self._app_task_id = app_task_id
def execute(self, context):
pass
@task
def get_tasks_by_tag():
return [f"task_{i}" for i in range(3)]
with DAG(dag_id="custom_expand", schedule=None, start_date=datetime(2023, 1, 1)) as dag:
CustomOperator.partial(task_id='start_task').expand(app_task_id=get_tasks_by_tag())
```
It would be awesome if you could simplify the code a bit to help identify what part exactly is causing your DAG to malfunction. As far as I can tell, the expansion logic does not seem to be the issue.
--
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