-
Type: Bug
-
Status: Acknowledged
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Production Improvements
-
Tags:
When cleaning expired projects, an exception occurred on the Gitty node
java.nio.file.DirectoryNotEmptyException: /efs/studio_git_repos/mara-parks-tyson-and.git/objects/pack at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) ~[?:1.8.0_282] at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[?:1.8.0_282] at java.nio.file.Files.delete(Files.java:1126) ~[?:1.8.0_282] at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:190) ~[org.eclipse.jgit-5.9.0.202009080501-r.jar:5.9.0.202009080501-r]
The error comes from the deletion of the releases before removing the repository. When fetching the list of releases for the project, we rely on `com.nuxeo.studio.gitty.core.service.GitRepositoryReader#read` to read the remote application definition and it never closes the repository after the read. So when trying to remove the repository after listing the releases, it fails as there is still a lock from the previous read.
- Is referenced in