You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ngnnah (via GitHub)" <gi...@apache.org> on 2026/10/09 10:12:14 UTC
Re: [I] `map_index_template` that produces numbers fails [airflow]
ngnnah commented on issue #71586:
URL: https://github.com/apache/airflow/issues/71586#issuecomment-6078848464
Hit this on 3.3.2 (task-sdk 1.3.1). We set `render_template_as_native_obj=True` for every DAG through a shared factory, and a mapped task labelled `map_index_template="{{ task.file_id }}"` (an int id) failed all 85 instances on its first production run.
Re whether it's a bug: quoting the template works, but a map index label can only ever be a string. `_render_map_index` is typed `-> str | None`, and `SetRenderedMapIndex.rendered_map_index` is `str`; with the `len()` removed, an int still fails there (`Input should be a valid string`). Native rendering can't produce a valid non-string label, so for this one template it only adds a failure mode.
It also fails late. The pre-execute render swallows the error and the post-execute render raises it, so the task's work completes and then the task is marked failed and retried.
+1 for the `str()` in #71592.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org