importer/git_repository: if an exception occurs, no cleanup happens
Bug #1765219 reported by
Nish Aravamudan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
atexit only runs on successful completion, but if a system-level issue occurs (e.g., disk is full), we get errors from subprocess or even the interpreter itself. In that case, the error is bubbled all the way up to the user and no cleanup is done. We want to cleanup in all cases.
Perhaps this should be try/except/finally in the importer's code?
Related branches
~racb/git-ubuntu:importer-cleanup-tmpdir-always
- Server Team CI bot: Approve (continuous-integration)
- Andreas Hasenack: Approve
- Nish Aravamudan: Approve
- Robie Basak: Pending requested
-
Diff: 384 lines (+227/-63)4 files modifiedgitubuntu/git_repository.py (+21/-1)
gitubuntu/importer.py (+117/-62)
gitubuntu/test_git_repository.py (+27/-0)
gitubuntu/test_importer.py (+62/-0)
~nacc/git-ubuntu:importer-cleanup-tmpdir-always
Superseded
for merging
into
git-ubuntu:master
- Robie Basak: Needs Fixing
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 313 lines (+174/-36)4 files modifiedgitubuntu/git_repository.py (+12/-1)
gitubuntu/importer.py (+88/-35)
gitubuntu/test_git_repository.py (+27/-0)
gitubuntu/test_importer.py (+47/-0)
To post a comment you must log in.
This is now resolved by using try/finally instead in ~racb/usd- importer: importer- cleanup- tmpdir- always.