Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12247

Saving repository settings with diff transcoding enabled fails saying diff transcoding can't be enabled

    XMLWordPrintable

Details

    Description

      Issue Summary

      For a repository where diff transcoding is enabled, subsequent attempts to save repository settings fail with an error indicating "Diff transcoding could not be enabled. Check the logs for more details."

      Steps to Reproduce

      1. Enable diff transcoding. The first enable should work
      2. Try to save repository settings a second time with diff transcoding still enabled

      Expected Results

      Repository settings should save without errors. Since diff transcoding was already enabled, it should remain enabled.

      Actual Results

      Repository settings are not saved, and an error is shown.

      An exception similar to the following is shown in the log files:

      2020-03-18 20:47:50,395 ERROR [http-nio-7990-exec-9] bturner *14EHASKx1247x30389x0 16o56n4 1.1.1.1 "POST /projects/KEY/repos/slug/settings HTTP/1.1" c.a.s.i.s.g.t.DefaultTranscodeService KEY/slug[1]: Diff transcoding could not be enabled
      java.nio.file.FileAlreadyExistsException: /path/to/bitbucket/home/shared/data/repositories/1/transcode.pl
              at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
              at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
              at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
              at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
              at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
              at java.base/java.nio.file.Files.newOutputStream(Files.java:219)
              at java.base/java.nio.file.Files.copy(Files.java:3066)
              at com.atlassian.stash.internal.scm.git.transcode.DefaultTranscodeService.enable(DefaultTranscodeService.java:204)
              at com.atlassian.stash.internal.scm.git.transcode.DefaultTranscodeService.setEnabled(DefaultTranscodeService.java:99)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider$1.invoke(OsgiSafeProxyProvider.java:95)
              at com.atlassian.stash.internal.scm.git.ui.TranscodeDiffsFormFragment.execute(TranscodeDiffsFormFragment.java:64)
      

      Workaround

      Disable diff transcoding and save settings. Then reenable transcoding and save again.

      Attachments

        Activity

          People

            bturner Bryan Turner (Inactive)
            bturner Bryan Turner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: