-
Bug
-
Resolution: Fixed
-
Medium
-
9.1.0
-
None
-
1
-
Severity 3 - Minor
-
Issue Summary
This is reproducible on Data Center: (yes)
When a spec scan run for a plan branch with the LFS enabled, and there are missing LFS objects in the remote repository, specs scanning will fail with the error message - Object does not exist on the server: [404] Object does not exist on the server
The result of this LFS failure is;
- The status of this failure is not shown in the plan branch build result status, instead, the plan branch status remains "awaiting spec execution" even if there was a spec scan run for the branch.
- In addition to not updating the plan branch build status, sometimes the repository branch name can't be seen or searched on the Linked repository specs status page.
Steps to Reproduce
There are no concrete steps to reproduce the issue, but for the user instance where the LFS object is missing in the repository branch, the issue can be reproduced at will.
Expected Results
When a spec scan fails to create a plan branch, Bamboo should update the plan branch build status also with the failure.
Actual Results
Bamboo only updates the linked repository specs status but does not update the plan branch build status. The LFS 404 error can be seen in the logs
2023-03-14 17:02:50,871 INFO [15-BAM::SpecsDetection:pool-19-thread-1] [RssDetectionRunnable] Exception while executing RSS detection for RssDetectionWork[repository=5145781,branch=feature/repo] Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch 'refs/heads/feature/develop' from 'ssh://git@remote.com/repo/main.git' to source directory '/var/bamboo/local-working-dir/_git-repositories-cache/92cb6c8f6f62fb441245c36527f29eb30ccf9e17'. command [/bin/git lfs fetch ssh://fec9d741-78ac-4903-854f-74ea76eb6ce8@127.0.0.1:37571/repo/main.git refs/heads/feature/develop] failed with code 2. Working directory was [/var/bamboo/local-working-dir/_git-repositories-cache/92cb6c8f6f62fb441245c36527f29eb30ccf9e17]., stderr: fetch: Fetching reference refs/heads/feature/repo [3d9790b405908c2b9fba488553142065f5b9c219fe0129cf1c230e5074bfd9c4] Object does not exist on the server: [404] Object does not exist on the server error: failed to fetch some objects from 'https://127.0.0.1/repo/main.git/info/lfs' at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.updateToLatestRevision(BitbucketServerWorkingCopyManager.java:151) ~[?:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$0(RepositoryStoredSpecsServiceImpl.java:164) ~[atlassian-bamboo-import-export-9.1.1.jar:?] at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:140) ~[atlassian-bamboo-core-9.1.1.jar:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$1(RepositoryStoredSpecsServiceImpl.java:169) ~[atlassian-bamboo-import-export-9.1.1.jar:?] at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:126) ~[atlassian-bamboo-core-9.1.1.jar:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:167) ~[atlassian-bamboo-import-export-9.1.1.jar:?] ... 11 more Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch 'refs/heads/feature/develop' from 'ssh://git@remote.com/repo/main.git' to source directory '/var/bamboo/local-working-dir/_git-repositories-cache/92cb6c8f6f62fb441245c36527f29eb30ccf9e17'. command [/bin/git lfs fetch ssh://fec9d741-78ac-4903-854f-74ea76eb6ce8@127.0.0.1:37571/repo/main.git refs/heads/feature/develop] failed with code 2. Working directory was [/var/bamboo/local-working-dir/_git-repositories-cache/92cb6c8f6f62fb441245c36527f29eb30ccf9e17]., stderr: fetch: Fetching reference refs/heads/feature/develop [3d9790b405908c2b9fba488553142065f5b9c219fe0129cf1c230e5074bfd9c4] Object does not exist on the server: [404] Object does not exist on the server error: failed to fetch some objects from 'https://127.0.0.1/repo/main.git/info/lfs' at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.fetch(NativeGitOperationHelper.java:554) ~[?:?] at com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor.fetchCacheWithRetry(AbstractGitExecutor.java:234) ~[?:?] at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.lambda$checkout$1(GitWorkingCopyManager.java:236) ~[?:?] at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293) ~[atlassian-util-concurrent-4.0.1.jar:?] at com.atlassian.bamboo.plugins.git.GitCacheDirectory$LoggingManagedLock.withLock(GitCacheDirectory.java:48) ~[?:?] at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.checkout(GitWorkingCopyManager.java:234) ~[?:?] at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.updateToLatestRevision(GitWorkingCopyManager.java:136) ~[?:?] at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.updateToLatestRevision(BitbucketServerWorkingCopyManager.java:147) ~[?:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$0(RepositoryStoredSpecsServiceImpl.java:164) ~[atlassian-bamboo-import-export-9.1.1.jar:?] at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:140) ~[atlassian-bamboo-core-9.1.1.jar:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runBambooSpecs$1(RepositoryStoredSpecsServiceImpl.java:169) ~[atlassian-bamboo-import-export-9.1.1.jar:?] at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:126) ~[atlassian-bamboo-core-9.1.1.jar:?] at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:167) ~[atlassian-bamboo-import-export-9.1.1.jar:?]
Workaround
Push the lfs missing object to the remote repository