ryandutton commented on issue #57553: URL: https://github.com/apache/airflow/issues/57553#issuecomment-3485758895
Issue: A section of code appears to be unreachable for completed pods. The adopt_or_reset_orphaned_tasks method, which runs periodically in the scheduler, is responsible for adopting both launched and completed pods. A change introduced in [this commit](https://github.com/apache/airflow/pull/39531/files#diff-b0491913f69327937706aea8fc77a71efeb979897898e405ade2b162ad862476) prevents _adopt_completed_pods from being called when completed pods exist but no adoptable (launched) pods are present. The results of this logic are stored in tis_to_adopt_or_reset. Proposed fix: Decouple the call to _adopt_completed_pods from the query that determines whether launched tasks are available for adoption. I was able to resolve this locally by invoking self._adopt_completed_pods within the Kubernetes executor’s start method. -- 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]
