manipatnam commented on PR #67551:
URL: https://github.com/apache/airflow/pull/67551#issuecomment-4545453053
Tested using the following DAG:
```python
from datetime import datetime
from airflow.decorators import dag, task
@dag(
dag_id="dynamic_mapped_dag",
start_date=datetime(2026, 1, 1),
schedule=None,
catchup=False,
tags=["dynamic", "mapped"],
)
def dynamic_mapped_dag():
@task
def generate_indexes() -> list[int]:
return list(range(126))
@task
def process(index: int) -> int:
print(f"Processing map_index={index}")
return index
@task(map_index_template="{{ user }}")
def process_labeled(user: str) -> str:
print(f"Processing user={user}")
return user
process.expand(index=generate_indexes())
process_labeled.expand(user=["zebra", "apple", "mango", "cherry",
"banana"])
dynamic_mapped_dag()
```
---
# Task: `process`
## Before this PR (including #66008 fix)
### Default view

### When sorted ascending

### When sorted descending

---
## Using the code in this PR (also includes #66008 fix)
### Default behaviour when no filter is applied

### When sorted ascending

### When sorted descending

### Default behaviour when `map_index` 124 and 123 are retried

---
# Task: `process_labeled` (Nothing changed)
## Before this PR (including #66008 fix)
### Default view

### When sorted ascending

### When sorted descending

### Default view when `map_index` `cherry` and `mango` are retried

---
## Using the code in this PR (also includes #66008 fix)
### Default behaviour when no filter is applied

### When sorted ascending

### When sorted descending

### Default behaviour when `map_index` `cherry` and `mango` are retried

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