e-galan commented on PR #39329:
URL: https://github.com/apache/airflow/pull/39329#issuecomment-2095847615

   > Incorrect use of find_pod is causing this problem. Use the create_pod 
response object V1Pod for further operations instead of calling the find_pod. 
And cleanup the existing pods before starting the new pod.
   > 
   > @jedcunningham, @hussein-awala WDYT
   
   @dirrao It does not seem to me that `cleanup()` was designed to be run in 
the beginning of the `execute_sync()` method, given the many checks it 
contains.  Should I refactor it or just create another method and call it at 
the start of `execute_sync()`?
   
   Also, in the case with `reattach_on_restart=False` we still need to run 
`find_pod()` to actually find out that there is an extra pod left from a 
previous task attempt and then update its labels before calling `cleanup()` or 
something with a similar functionality. Otherwise it won't be called at all. 
   
   


-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to