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

Nested git processes do not apply quarantine environment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.14.0
    • 4.13.0, 5.0.0, 5.13.0
    • None

    Description

      When a git process is started using Bitbucket Server's CommandBuilder API (which extends to all of our service APIs, since our command factory implementations use the builders), if it's running in a pre-receive hook it automatically inherits any quarantine environment. However, if one of those processes kicks off a nested process in one of its pump handlers (e.g. in a CommandOutputHandler, or in a callback like PreRepositoryHookCommitCallback), that process does not inherit the quarantine environment and the command will fail if it attempts to access any in-flight objects.

      In 5.x, the workaround for this issue is to use the ScmHookDetails to get the environment, and then apply that environment to the builder for the nested process. However, since the environment exposes paths to repositories on disk, it's going to be removed in 6.0. That means the server needs a built-in mechanism to automatically transfer the quarantine environment to pump threads.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: