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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to