krcrouse opened a new pull request, #24636:
URL: https://github.com/apache/airflow/pull/24636
related: #17507
related: #20992
---
This fixes issues in which running a task with impersonation leads to the
error `Recorded pid {PID1} does not match the current pid {PID2}`. The issue
appears to be that in some cases the recorded pid (which is also the
taskinstance pid) is None, which leads the ensuing
`psutils.Process(ti.pid).ppid()` call to return the parent of the current
running process instead of the parent of the taskinstance.
I was able to reproduce this error regularly and separately traced all
processes to try to identify what they were. The "current pid" is the task
runner, and in most cases the relevant call was so short lived I couldn't even
get it in my tracing - which would explain why it was no longer registered to
the task instance.
--
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]