Unable to merge a pull request when using the Required Builds merge check in Bitbucket Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: 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 は除く

    

要約

After configuring Required Builds on a repository, pull requests can't be merged despite having a successful build.

環境

Bitbucket Server or Data Center 7.14 or higher

診断

The following are symptoms when a pull request can't be merged while using the Required Builds merge check:

  • The bb_build_status table is empty.
  • New build statuses go to the AO_CFE8FA_BUILD_STATUS table
  • The file located at $BITBUCKET_HOME/shared/config/upgrades/core-builds-ao-mig contains STEP1_ASYNC_LIQUIBASE_MIGRATION
  • The asyncdblock table contains a record with locked=true and lockgranted is way past the current date

原因

The Required Builds merge check was introduced in 7.14.  To take advantage of this feature, build statuses need to be stored in the bb_build_status table.

Customers who have upgraded to version 7.4 or higher will have their build statuses migrated from AO_CFE8FA_BUILD_STATUS to bb_build_status.

When this migration fails or is incomplete, the Required Builds can't be used.

ソリューション

How do I resume the migration?

  1. Stop all Bitbucket nodes
  2. Delete the row in the asyncdblock table
  3. Start Bitbucket
  4. Monitor the progress of the migration using the following methods:
    • Check the JMX bean AsyncMigrationUpgrade for the status of the migration task

    • Run the following query to return the number of records remaining to be processed. A value of 0 means that the migration is complete.

      select count(*) from "AO_CFE8FA_BUILD_STATUS" where "ID" >= (select cast(prop_value as integer) from app_property where prop_key = 'build.status.migration.max.ao.id');
    • A complete migration will be indicated by a value of DONE in $BITBUCKET_HOME/shared/config/upgrades/core-builds-ao-mig


Once the migration is complete, new build statuses will be stored in the bb_build_status table and the Required Builds can be used. 


最終更新日 2023 年 11 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.