-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:task-execution-interface-aip72AIP-72: Task Execution Interface (TEI) aka Task SDKAIP-72: Task Execution Interface (TEI) aka Task SDKkind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Milestone
Description
Apache Airflow version
3.0.0
If "Other Airflow 2 version" selected, which one?
main branch
What happened?
In Airflow 2.10.5 the dag below changes the map index displayed in the UI:
from airflow.decorators import dag, task
@dag()
def my_dag():
@task
def upstream_task():
return [1, 2, 3]
@task(
map_index_template="Hello! {{ my_custom_template }}",
)
def map_me(x, **context):
print(x)
from airflow.operators.python import get_current_context
context = get_current_context()
context["my_custom_template"] = f"{x}"
map_me.expand(x=upstream_task())
my_dag()
In RC 2 map_index_template does not change the index. (no errors)
from airflow.decorators import dag, task
@dag
def dtm():
@task
def upstream_task():
return [1, 2, 3]
@task(
map_index_template="Hello! {{ my_custom_template }}",
)
def map_me(x):
print(x)
from airflow.sdk.definitions.context import get_current_context
context = get_current_context()
context["my_custom_template"] = f"{x}"
map_me.expand(x=upstream_task())
dtm()
What you think should happen instead?
No response
How to reproduce
Use the second dag above and run it. See the integer index in the UI.
Operating System
MacOS
Versions of Apache Airflow Providers
Breeze
Deployment
Other
Deployment details
breeze
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
Metadata
Metadata
Assignees
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:task-execution-interface-aip72AIP-72: Task Execution Interface (TEI) aka Task SDKAIP-72: Task Execution Interface (TEI) aka Task SDKkind:bugThis is a clearly a bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new releaseHigh priority bug that should be patched quickly but does not require immediate new release
Type
Projects
Status
Done

