SameerMesiah97 commented on PR #59691:
URL: https://github.com/apache/airflow/pull/59691#issuecomment-4674703074
> @SameerMesiah97 have you tested this fix locally with Dynamic Task
Expansion, any logs to prove that it the change fixes the issue? Maybe a stupid
question, but that could help approve the PR as for me code is looking good,
but of course I haven't tested it so I cannot confirm this will actually fix
the issue. Nice work BTW.
@dabla
I have ran the following DAG (closely mirrors the one used in issue #59289)
using the code in `main`:
```
from datetime import datetime
from airflow import DAG
from airflow.operators.empty import EmptyOperator
from airflow.decorators import dag, task, task_group
from airflow.utils.trigger_rule import TriggerRule
@task
def get_the_list():
return ["one", "two", "three"]
@task
def process_something(x: str):
output = f"{x}"
print(output)
return output
@task_group
def the_task_group(x: str):
start = EmptyOperator(task_id="start")
something = process_something(x)
end = EmptyOperator(task_id="end")
start >> something >> end
@dag(
default_args={
"start_date": datetime(year=2025, month=12, day=1),
"trigger_rule": TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS,
}
)
def dtm_bug_reproduce_dag_original_case():
end = EmptyOperator(task_id="end")
the_list = get_the_list()
mapped_group = (
the_task_group
.expand(x=the_list)
)
the_list >> mapped_group >> end
dag = dtm_bug_reproduce_dag_original_case()
```
This is the UI screenshot for the DAG run:
<img width="1835" height="871" alt="image"
src="https://github.com/user-attachments/assets/754d231e-3ef3-48b4-bf79-e0bb2f855592"
/>
The same DAG was run again using the branch which has my fix (rebased on top
of the latest version of `main`):
<img width="1828" height="936" alt="image"
src="https://github.com/user-attachments/assets/be3d67d3-978e-491d-b5f1-82b3eaf9d4fc"
/>
You can observe that the terminal tasks of both the DAG and the mapped group
are no longer being skipped. I must admit that unlike in previous test runs,
the DAG is being marked as successful. And amongst the other DAG shapes I
tested, the bug is no longer present in `main` for a few of them. But it exists
for at least this specific DAG I have presented here and mutliple others
besides those few that I have tested.
--
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]