tirkarthi commented on issue #27859:
URL: https://github.com/apache/airflow/issues/27859#issuecomment-1325378446
I tried below dag and couldn't reproduce the error in main branch. I can see
`get_results` mapped with with validation_1 and validation_2. Is it
reproducible on latest stable release 2.4.3? Can you please add a simpler
example with appropriate formatting so that this can be reproduced?
```python
from datetime import datetime
from airflow.decorators import task
from airflow import DAG
from airflow.operators.empty import EmptyOperator
with DAG(
dag_id="conciliacao_hours_gap_validation",
schedule_interval="@daily",
start_date=datetime(2021, 1, 1),
catchup=False,
default_args={"owner": "donus", "start_date": "2021-08-15"},
) as dag:
task1 = EmptyOperator(task_id="validation_1")
task2 = EmptyOperator(task_id="validation_2")
@task()
def get_result(task_idd, *, ti=None):
print(f"PRINT task: {task_idd}")
print(dag.task_ids)
list_tasks_get_results = [
task for task in dag.task_ids if "validation" in task
] # ONLY TASKS THAT CONTAINS "VALIDATION"
get_results = get_result.expand(task_idd=list_tasks_get_results)
task1 >> task2 >> get_results
```
--
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]