You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/08 11:47:24 UTC
[GitHub] [airflow] uranusjr commented on issue #34023: Trigger Rule ONE_FAILED does not work in task group with mapped tasks
uranusjr commented on issue #34023:
URL: https://github.com/apache/airflow/issues/34023#issuecomment-1711544071
The variable comes from here:
https://github.com/apache/airflow/blob/5744b424f3ddb3efdf5c2607d13e084955907cc8/airflow/models/taskinstance.py#L2855-L2856
So there are only two scenarios `abs` would make a difference:
1. Either `ancestor_ti_count` or `ti_count` is negative
2. `self.map_index` is negative
The first point seems unlikely since those both _count_ something and should be a non-negative integer. Of course it’s possible we implemented something wrong, but in that case that bug should be fixed so the two values are always either zero or positive.
The second is more viable, and the only possible negative `map_index` value is -1, i.e. if the task instance is not expanded. This in turn is not right since this function should only be called on a mapped task instance in the first place. A task instance with map index of -1 should not appear here. And if it does, making -1 become 1 does not make sense as a fix.
--
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