Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6429

Failed to delete git repository

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Acknowledged
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: