Can't detect branches for plan error even though the Automatic branch management is disabled
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
Automatic branch management is disabled.
The Plan Summary page have the error "Can't detect branches for plan PROJ-PLAN"
atlassian-bamboo.log
に次のメッセージが出力される。
2016-05-31 16:39:15,101 DEBUG [11-BranchDetectionBackgroundThread:pool-19-thread-2] [BranchDetectionServiceImpl] Detecting already existing branches for plan PROJ-PLAN
2016-05-31 16:39:15,463 INFO [11-BranchDetectionBackgroundThread:pool-19-thread-2] [DefaultErrorHandler] Recording an error: Can't detect branches for plan PROJ-PLAN
原因
Bamboo detected a branch to be initialized for that Plan in the database and try to connect to the repository to initialize it.
ソリューション
- Shutdown Bamboo
- Backup database for rollback purposes
Search for the problematic data with the following SQL query depending on the build key:
SELECT * FROM VCS_BRANCH WHERE CHAIN_ID=(SELECT BUILD_ID FROM BUILD WHERE FULL_KEY='PROJ-PLAN');
The problematic data is the result with NAME that contain "initialize.chain.branches".
Delete the problematic data
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
DELETE FROM VCS_BRANCH WHERE CHAIN_ID=(SELECT BUILD_ID FROM BUILD WHERE FULL_KEY='PROJ-PLAN') AND NAME like '%initialize.chain.branches%';
Restart Bamboo