Repository‑Stored Specs Scan Fails in Bamboo with Git 2.52.0 on Mounted Volume (GIT_DISCOVERY_ACROSS_FILESYSTEM Issue)

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      Bamboo Specs fails to Scan in Git 2.52.0 on a mounted disk while doing the following command

      git remote set-url origin file:///var/atlassian/bamboo-home/local/local-working-dir/_git-repositories-cache/<hash> 

      Steps to Reproduce

      It is suspected that the below combination is causing the issue.

      1. Build Bamboo application with following
        1. Git 2.52.0
        2. The filesystem is mounted at the directory and make that directory as the Bamboo home
          /dev/mapper/applvg-u01lv on /b01 type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota) 
      2. create a linked repository of Bitbucket DC with Bamboo Specs in it.
      3. Configure it as a Bamboo Specs repo and click Scan.

      Expected Results

      Bamboo application scan Specs repository without any issues

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      Error during specs scan:
      com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git remote set-url origin file:///XX/var/atlassian/application-data/bamboo/local-working-dir/_git-repositories-cache/<HASH>] failed with code 128. Working directory was [/XX/var/atlassian/application-data/bamboo/local-working-dir/serverSide/REPOSITORY_STORED_SPECS/repository-XX-master/checkout]., stderr:
      fatal: not a git repository (or any parent up to mount point /)
      Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
      at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.lambda$updateToLatestRevisionForSpecs$8(BitbucketServerWorkingCopyManager.java:175)
      at com.atlassian.bamboo.plugins.stash.v2.AbstractBitbucketServerExecutor.executeOnMirrorWithPrimaryFallback(AbstractBitbucketServerExecutor.java:60)
      at com.atlassian.bamboo.plugins.stash.v2.AbstractBitbucketServerExecutor.executeOnMirrorWithPrimaryFallback(AbstractBitbucketServerExecutor.java:39)
      at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.updateToLatestRevisionForSpecs(BitbucketServerWorkingCopyManager.java:169)
      at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$0(RepositoryStoredSpecsServiceImpl.java:164) 

      Workaround

      Revert back to older version of GIT before 2.52

            Assignee:
            Marcin Gardias
            Reporter:
            Vani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: