kaxil opened a new issue, #47784:
URL: https://github.com/apache/airflow/issues/47784

   ### Body
   
   When using a DAG with Mapped Task Group, it fails when clicking on the 
mapped task in the Grid View
   
   
![Image](https://github.com/user-attachments/assets/6fb9aa3a-b003-4e65-88bf-aca152882717)
   
   
![Image](https://github.com/user-attachments/assets/31e042b5-f131-442d-aba3-937058725c05)
   
   Error:
   
   ```
   404 Not Found
   The Mapped Task Instance with dag_id: `branching_issue`, run_id: 
`manual__2025-03-14T12:04:11.471638+00:00_uvW0b3sy`, task_id: 
`showcase_branching_issues.branch_int`, and map_index: `-1` was not found
   ```
   
   Dag file to reproduce:
   
   ```python
   from datetime import datetime
   
   from airflow.decorators import dag, task, task_group
   
   
   @dag(
       dag_id="branching_issue",
       schedule=None,
       start_date=datetime(2021, 1, 1),
   )
   def BranchingIssue():
       @task
       def branch_b():
           pass
   
       @task
       def branch_a():
           pass
   
       @task
       def initiate_dynamic_mapping():
           import random
   
           random_len = random.randint(1, 6)
           return [i for i in range(random_len)]
   
       @task.branch
       def branch_int(k):
           import time
   
           branch = "showcase_branching_issues."
           if k % 2 == 0:
               branch += "branch_a"
           else:
               time.sleep(5)
               branch += "branch_b"
           return branch
   
       @task_group
       def showcase_branching_issues(k):
           selected_branch = branch_int(k)
           selected_branch >> [branch_a(), branch_b()]
   
       list_k = initiate_dynamic_mapping()
       showcase_branching_issues.expand(k=list_k)
   
   
   dag = BranchingIssue()
   
   ```
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow 
project.


-- 
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]

Reply via email to