You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: reraise original exception and windows specific cleanup errors
* Basing on #243, we are having some difficulty with pygit2 Repository file
handlers being open. in `pygit.py` we instantiate the Repository
class, which holds references to `pack` and `.idx` git objects and
keeps files open. If taf and cleanup is attempted from same subprocess,
Repository handler won't be deleted, and cleanup error occurs. Calling
manual garbage collection did not help. This
seems to be a known issue throughout the git community, see [1] and
[2].
[1] - libgit2/pygit2#596
[2] - gitpython-developers/GitPython#546
Several workarounds were proposed by the community, but it seems that
we can't fully replicate those workarounds. In [2] they attempt to
workaround the issue by deleting git cache. That works for them
because their git implementation has file handlers open in pure
python, while we only do subprocess git calls.
Our TODO: if these windows specific error issues keep persisting, figure out how to
garbage collect pygit2 Repository handler correctly.
For now settle on error handling, as this issue is
specific to a subprocess call that calls taf/updater. Though we should
keep track of progress of these known bugs, so we can fix them if they
get addressed by pygit2 or gitpython
0 commit comments