-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 12.1.2
-
Component/s: Bamboo Specs, Builds
-
None
-
Severity 3 - Minor
Issue Summary
RSS detection fails to trigger builds on active plan branches after a deleted branch's plan branch is disabled
Steps to Reproduce
- Create a linked repository with specs scan enabled.
- Create a plan linked to that repository and under branch settings enable "When new branch in repository is created".
- Create a branch in the repository with name requirement1.
- Create a branch in the repository with name feature/requirement1.
- Verify Bamboo created 2 plan branches requirement1 and feature-requirement1.
- Delete the branch requirement1 in Bitbucket. The corresponding plan branch will be disabled in the Bamboo plan.
- Make changes in the branch feature/requirement1.
Expected Results
After deleting branch requirement1 in Bitbucket (and the corresponding plan branch being disabled in Bamboo), making changes to branch feature/requirement1 should successfully trigger a build for that plan branch.
Actual Results
The build does not trigger for feature/requirement1. RSS detection still attempts to fetch the deleted branch reference refs/requirement1 and fails with exit code 128 ("couldn't find remote ref refs/requirement1"), blocking builds on other active branches.
The below exception is thrown in the xxxxxxx.log file:
2026-06-10 06:58:49,994 INFO [27-BAM::SpecsDetection:pool-28-thread-1] [RssDetectionRunnable] Exception while executing RSS detection for RssDetectionWork[repository=557057,branch=requirement1] com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git fetch --no-tags -f -p -P ssh://dcddd19b-0688-4118-a1f5-a58b6db15d4b@127.0.0.1:43443/tp/test-repo.git +refs/requirement1:refs/requirement1 --update-head-ok -q] failed with code 128. Working directory was [/var/atlassian/application-data/bamboo/local-working-dir/_git-repositories-cache/82252ed90129d8949d23776c4cea47adb5a76d5f]., stderr: Warning: Permanently added '[127.0.0.1]:43443' (RSA) to the list of known hosts. fatal: couldn't find remote ref refs/requirement1 fatal: the remote end hung up unexpectedly at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerBambooSpecsHandler.lambda$detectSpecRevision$0(BitbucketServerBambooSpecsHandler.java:25) 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.BitbucketServerBambooSpecsHandler.detectSpecRevision(BitbucketServerBambooSpecsHandler.java:19) at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.getRssDetectionTriggerData(RssDetectionServiceImpl.java:341) at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:375) at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:27) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:18) at com.atlassian.bamboo.security.ImpersonationHelper.lambda$makeRunnableWithSystemAuthority$0(ImpersonationHelper.java:56) at java.base/java.lang.Thread.run(Thread.java:1583)
Workaround
Delete the disabled plan branch manually from Bamboo.