Repository navigation
Labels
affected_version:3.0Issues Reported for 3.0area:corearea:dynamic-task-mappingAIP-42kind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release
Milestone
Description
Apache Airflow version
3.0.4
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Cannot restart a single mapped task. It always restarts all sibling mapped tasks as well. I found this old issue #24699 so I thought it should be working, but doesn't for me. We have multiple issues here:
- When clearing the individual task it shows all siblings in the "Downstream" selection.
- It re-runs all sibling tasks. Cannot tell for certain this isn't just a UI bug in this simple example. But in my real-world use case, where Airflow triggers Google Cloud Run Jobs, it does spawn n Cloud Run Jobs upon restart.
- It also re-runs all downstream tasks for all map indices.
- For previous task executions, upon UI reload, I only get "::group::Log message source details: sources=["Could not read served logs: 'TaskInstanceHistory' object has no attribute 'triggerer_job'"]" and not the actual logs.
Or am I misunderstanding this feature?
What you think should happen instead?
Only the selected mapped task should be restarted.
The logs should properly show up in the UI for previous task tries.
Only downstream tasks with the same map index should be re-run (not sure this is easily possible or intended, but without it I don't see how restarting individual tasks would be of much use).
How to reproduce
@task
def task1(val: str):
print("Task 2" + val)
@task
def task2(val: str):
print("Task 2" + val)
@dag(dag_id="test")
def get_dag() -> None:
t1 = task1.expand(val=["foo", "bar"])
t2 = task2.expand(val=["foo", "bar"])
t1 >> t2
get_dag()
Run once. Then re-run an individual task of task1.
Operating System
Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reacted by Mat, quassy and Matt Usifer
Metadata
Metadata
Assignees
Labels
affected_version:3.0Issues Reported for 3.0area:corearea:dynamic-task-mappingAIP-42kind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release
Activity
jroachgolf84 commentedon Aug 21, 2025
I am able to reproduce this behavior. However, I'd like to address this point below:
In this case, if I cleared the state of
task1[0], I would expect bothtask2[0]andtask1[0]to be re-run, not justtask2[0].MarcusCramer91 commentedon Aug 29, 2025
Agree! But I wouldn't expect task2[1] and task1[1] to be re-run, right?
MarcusCramer91 commentedon Sep 15, 2025
Any updates here? :) This is really making production use for us more cumbersome right now.
kevinhongzl commentedon Sep 30, 2025
Hi @MarcusCramer91
I tried restarting a single mapped task by unselecting all the options (past, future, upstream, etc.) above:
and it worked as expected. No other task instances were restarted except the one I clicked on. Would you mind checking this to see if it works for you?
matthieuauger commentedon Sep 30, 2025
Hello,
I think the initial issue is related to "Downstream" related tasks and depth-first workflows.
Use case is when you have multiple mapped tasks in a workflow, for example in a group.
My personal is use case is that I download data for each of my users with mapped tasks.
My DAG looks like this
Let's assume everything went well for 9 out of 10 users (index 0 to 8) but failed for last user (mapped task index 9).
I would like to be able to restart task instance create_job[9], click downstream and see download_data[9] and validate_date[9].
This is really useful because currently if a mapped task fails, you need to re-run everything.
I tried again with new version but issue still persist
MarcusCramer91 commentedon Oct 13, 2025
@kevinhongzl Exactly what @matthieuauger said :)
uranusjr commentedon Oct 29, 2025
Can any of you try 3.1.1? I believe this is a duplicate to #56289.
matthieuauger commentedon Oct 29, 2025
@uranusjr Just tried on 3.1.1 but restarting create_job[0] also trigger all indexes for downstream tasks within the group.
uranusjr commentedon Oct 30, 2025
So now it correctly only triggers
create_job[0](instead of allcreate_jobinstances), but the downstream handling is still not correct?matthieuauger commentedon Oct 30, 2025
Indeed good catch! I just retried it and it seems to be an improvement from previous situation
uranusjr commentedon Oct 30, 2025
Cool, I’ll take a stab at this and hopefully fix the downstream issue in the next release.
matthieuauger commentedon Oct 30, 2025
That would be a really huge improvement from my perspective, real one-piece-flow enabled on my DAGs. Can't wait
eric-workweek commentedon Oct 31, 2025
It seems like this is also a problem in version 2.11.0 (
Airflow 2.11.0+astro.3specifically)?matthieuauger commentedon Dec 16, 2025
Hello,
I tried this on last Airflow version but this still does not work as described here: #54779 (comment)
If you restart a mapped task, it doesn't include its siblings, which is good.
But it still includes all the downstream task siblings.
In my screenshot for example, when I restart the create_job n°25 I still get all the mapped tasks for downstream task request_report_creation.
Could we reopen this issue?
MarcusCramer91 commentedon Feb 2, 2026
I can confirm what @matthieuauger said. Any chance you could have a second look @uranusjr ? :)
I am not 100% certain how exactly it would work, since it somehow must be specified that a downstream mapped task refers to the same mapping indices as the retried task. But it is a very common use case to map multiple tasks to the same array as stated above.