From 7911f19f8e2d3a54bdf798d6876d5bba25029b5b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 02:49:23 +0000 Subject: [PATCH] ci(mergify): upgrade configuration to current format --- .github/mergify.yml | 438 ++++++++++++++++---------------------------- 1 file changed, 161 insertions(+), 277 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 7f56ca1ac2..2540ce5d24 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -7,165 +7,22 @@ # GLOBAL CONFIGURATIONS AND ALIASES # Define reusable conditions and patterns for better maintainability # ============================================================================== -misc: - # File pattern matchers - - &source_code_files files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$ - - &no_source_code_files -files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$ - - &only_go_unittest_files -files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$ - - &morethan_go_unittest_files files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$ - - # Build and test status conditions - - when_build_and_test_status_successs: &Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - - 'status-success=Build and test AMD64 Ubuntu 20.04' - - 'status-success=Build and test AMD64 Ubuntu 22.04' - - when_build_and_test_status_failed: &Build_AND_TEST_STATUS_FAILED_ON_UBUNTU_20_OR_UBUNTU_22 - - &failed_on_ubuntu_20 'check-failure=Build and test AMD64 Ubuntu 20.04' - - &failed_on_ubuntu_22 'check-failure=Build and test AMD64 Ubuntu 22.04' - - when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS - - 'status-success=go-sdk' - - 'status-success=milvus-sdk-go' - - 'status-success=ci-v2/go-sdk' - - when_cpp_unit_test_success: &WHEN_CPP_UNIT_TEST_SUCCESS - - 'status-success=cpp-unit-test' - - 'status-success=UT for Cpp' - - 'status-success=ci-v2/ut-cpp' - - when_go_unit_test_success: &WHEN_GO_UNIT_TEST_SUCCESS - - 'status-success=go-unit-test' - - 'status-success=UT for Go' - - 'status-success=ci-v2/ut-go' - - when_integration_unit_test_success: &WHEN_INTEGRATION_UNIT_TEST_SUCCESS - - 'status-success=integration-test' - - 'status-success=Integration Test' - - 'status-success=ci-v2/integration-test' - - when_e2e_test_success: &WHEN_E2E_TEST_SUCCESS - - 'status-success=cpu-e2e' - - 'status-success=ci-v2/e2e-default' - - when_build_success: &WHEN_BUILD_SUCCESS - - 'status-success=Build and test AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/build' - - when_code_check_ubuntu_success: &WHEN_CODE_CHECK_UBUNTU_SUCCESS - - 'status-success=Code Checker AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/code-check' - - # CI-v2 checker conditions (3.0 branch) - - when_build_ut_cov_success: &WHEN_BUILD_UT_COV_SUCCESS - - 'status-success=ci-v2/build-ut-cov' - - when_e2e_amd_success: &WHEN_E2E_AMD_SUCCESS - - 'status-success=ci-v2/e2e-amd' - - when_master_legacy_build_ut_cov_success: &WHEN_MASTER_LEGACY_BUILD_UT_COV_SUCCESS - and: - - or: *WHEN_BUILD_SUCCESS - - or: *WHEN_CPP_UNIT_TEST_SUCCESS - - or: *WHEN_GO_UNIT_TEST_SUCCESS - - or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS - - or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS - - when_master_go_unit_legacy_build_ut_cov_success: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_SUCCESS - and: - - or: *WHEN_BUILD_SUCCESS - - or: *WHEN_GO_UNIT_TEST_SUCCESS - - or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS - - when_master_build_ut_cov_gate_success: &WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS - status-success=ci-v2/build-ut-cov - - when_master_go_unit_build_ut_cov_gate_success: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS - status-success=ci-v2/build-ut-cov - - when_master_legacy_build_ut_cov_failure: &WHEN_MASTER_LEGACY_BUILD_UT_COV_FAILURE - or: - - and: - - not: - or: - - 'status-success=Build and test AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/build' - - or: - - 'status-failure=Build and test AMD64 Ubuntu 22.04' - - 'status-failure=ci-v2/build' - - and: - - not: - or: - - 'status-success=UT for Go' - - 'status-success=ci-v2/ut-go' - - or: - - 'status-failure=UT for Go' - - 'status-failure=ci-v2/ut-go' - - and: - - not: - or: - - 'status-success=Integration Test' - - 'status-success=ci-v2/integration-test' - - or: - - 'status-failure=Integration Test' - - 'status-failure=ci-v2/integration-test' - - and: - - *morethan_go_unittest_files - - not: - or: - - 'status-success=cpp-unit-test' - - 'status-success=ci-v2/ut-cpp' - - or: - - 'status-failure=cpp-unit-test' - - 'status-failure=ci-v2/ut-cpp' - - and: - - not: - or: - - 'status-success=Code Checker AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/code-check' - - or: - - 'status-failure=Code Checker AMD64 Ubuntu 22.04' - - 'status-failure=ci-v2/code-check' - - when_master_go_unit_legacy_build_ut_cov_failure: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_FAILURE - or: - - and: - - not: - or: - - 'status-success=Build and test AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/build' - - or: - - 'status-failure=Build and test AMD64 Ubuntu 22.04' - - 'status-failure=ci-v2/build' - - and: - - not: - or: - - 'status-success=UT for Go' - - 'status-success=ci-v2/ut-go' - - or: - - 'status-failure=UT for Go' - - 'status-failure=ci-v2/ut-go' - - and: - - not: - or: - - 'status-success=Code Checker AMD64 Ubuntu 22.04' - - 'status-success=ci-v2/code-check' - - or: - - 'status-failure=Code Checker AMD64 Ubuntu 22.04' - - 'status-failure=ci-v2/code-check' - - when_master_build_ut_cov_gate_failure: &WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE - and: - - -status-success=ci-v2/build-ut-cov - - status-failure=ci-v2/build-ut-cov - - when_master_go_unit_build_ut_cov_gate_failure: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE - and: - - -status-success=ci-v2/build-ut-cov - - status-failure=ci-v2/build-ut-cov - - # Branch configurations - - branch: &BRANCHES - - &MASTER_BRANCH base=master - - &2X_BRANCH base~=^2(\.\d+){1,2}$ - - &3X_BRANCH base=3.0 +pull_request_rules: + # ========================================================================== + # DCO (Developer Certificate of Origin) MANAGEMENT + # Handles DCO compliance for all contributions + # ========================================================================== + - name: Add needs-dco label when DCO check failed + conditions: + - or: &BRANCHES + - &MASTER_BRANCH base=master + - &2X_BRANCH base~=^2(\.\d+){1,2}$ + - &3X_BRANCH base=3.0 # ============================================================================== # PULL REQUEST RULES # Organized by functionality for better maintenance and understanding # ============================================================================== -pull_request_rules: - - # ========================================================================== - # DCO (Developer Certificate of Origin) MANAGEMENT - # Handles DCO compliance for all contributions - # ========================================================================== - - - name: Add needs-dco label when DCO check failed - conditions: - - or: *BRANCHES - -status-success=DCO actions: label: @@ -192,30 +49,49 @@ pull_request_rules: # CONTINUOUS INTEGRATION (CI) STATUS MANAGEMENT # Rules for managing CI test results and labeling PRs accordingly # ========================================================================== - - - name: Test passed for code changed on master + - name: Test passed for code changed on master conditions: - *MASTER_BRANCH - - *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS - - or: *WHEN_GO_SDK_STATUS_SUCCESS - - or: *WHEN_E2E_TEST_SUCCESS + - &WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS status-success=ci-v2/build-ut-cov + - or: &WHEN_GO_SDK_STATUS_SUCCESS + - 'status-success=go-sdk' + - 'status-success=milvus-sdk-go' + - 'status-success=ci-v2/go-sdk' + - or: &WHEN_E2E_TEST_SUCCESS + - 'status-success=cpu-e2e' + - 'status-success=ci-v2/e2e-default' # - 'status-success=codecov/patch' # - 'status-success=codecov/project' actions: label: add: - ci-passed - + - name: Test passed for code changed on 2.* branch conditions: - *2X_BRANCH - - or: *WHEN_BUILD_SUCCESS + - or: &WHEN_BUILD_SUCCESS + - 'status-success=Build and test AMD64 Ubuntu 22.04' + - 'status-success=ci-v2/build' # 2.* skip WHEN_GO_SDK_STATUS_SUCCESS - - or: *WHEN_CPP_UNIT_TEST_SUCCESS - - or: *WHEN_GO_UNIT_TEST_SUCCESS - - or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS + - or: &WHEN_CPP_UNIT_TEST_SUCCESS + - 'status-success=cpp-unit-test' + - 'status-success=UT for Cpp' + - 'status-success=ci-v2/ut-cpp' + - or: &WHEN_GO_UNIT_TEST_SUCCESS + - 'status-success=go-unit-test' + - 'status-success=UT for Go' + - 'status-success=ci-v2/ut-go' + - or: &WHEN_INTEGRATION_UNIT_TEST_SUCCESS + - 'status-success=integration-test' + - 'status-success=Integration Test' + - 'status-success=ci-v2/integration-test' - or: *WHEN_E2E_TEST_SUCCESS - - or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS + - or: &WHEN_CODE_CHECK_UBUNTU_SUCCESS + - 'status-success=Code Checker AMD64 Ubuntu 22.04' + - 'status-success=ci-v2/code-check' + + # CI-v2 checker conditions (3.0 branch) # - 'status-success=codecov/patch' # - 'status-success=codecov/project' actions: @@ -226,8 +102,10 @@ pull_request_rules: - name: Test passed for code changed on 3.0 branch conditions: - *3X_BRANCH - - or: *WHEN_BUILD_UT_COV_SUCCESS - - or: *WHEN_E2E_AMD_SUCCESS + - or: &WHEN_BUILD_UT_COV_SUCCESS + - 'status-success=ci-v2/build-ut-cov' + - or: &WHEN_E2E_AMD_SUCCESS + - 'status-success=ci-v2/e2e-amd' - or: *WHEN_GO_SDK_STATUS_SUCCESS actions: label: @@ -238,8 +116,8 @@ pull_request_rules: - name: Test passed for tests changed conditions: - or: - - *MASTER_BRANCH - - *2X_BRANCH + - *MASTER_BRANCH + - *2X_BRANCH - -files~=^(?!tests\/python_client).+ - or: *WHEN_E2E_TEST_SUCCESS actions: @@ -269,10 +147,10 @@ pull_request_rules: - name: Test passed for non rust go or c++ code changed conditions: - or: - - *MASTER_BRANCH - - *2X_BRANCH + - *MASTER_BRANCH + - *2X_BRANCH - or: *WHEN_E2E_TEST_SUCCESS - - *no_source_code_files + - &no_source_code_files -files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$ actions: label: add: @@ -291,8 +169,8 @@ pull_request_rules: - name: Test passed for go unittest code changed on master conditions: - *MASTER_BRANCH - - *only_go_unittest_files - - *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS + - &only_go_unittest_files -files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$ + - &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS status-success=ci-v2/build-ut-cov actions: label: add: @@ -346,7 +224,7 @@ pull_request_rules: - *MASTER_BRANCH - title~=\[skip e2e\] - *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS - - *source_code_files + - &source_code_files files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$ actions: label: add: @@ -386,8 +264,8 @@ pull_request_rules: - name: Remove ci-passed when E2E test not success for tests changed conditions: - or: - - *MASTER_BRANCH - - *2X_BRANCH + - *MASTER_BRANCH + - *2X_BRANCH - -files~=^(?!tests\/python_client).+ - label!=manual-pass - label=ci-passed @@ -424,34 +302,40 @@ pull_request_rules: - *source_code_files - or: # build-ut-cov replaces the legacy build/ut/code-check group on master. - - and: - - *only_go_unittest_files - - *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE - - and: - - *morethan_go_unittest_files - - *WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE + - and: + - *only_go_unittest_files + - and: + - -status-success=ci-v2/build-ut-cov + - status-failure=ci-v2/build-ut-cov + + # Branch configurations + - and: + - &morethan_go_unittest_files files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$ + - and: + - -status-success=ci-v2/build-ut-cov + - status-failure=ci-v2/build-ut-cov # E2E tests: remove only when E2E is required by the matching pass rule. - - and: - - -title~=\[skip e2e\] - - *morethan_go_unittest_files - - not: - or: - - status-success = cpu-e2e - - status-success = ci-v2/e2e-default - - or: - - status-failure = cpu-e2e - - status-failure = ci-v2/e2e-default + - and: + - -title~=\[skip e2e\] + - *morethan_go_unittest_files + - not: + or: + - status-success = cpu-e2e + - status-success = ci-v2/e2e-default + - or: + - status-failure = cpu-e2e + - status-failure = ci-v2/e2e-default # E2E tests: required case - remove if no success AND has failure (when not skipped) - - and: - - -title~=\[skip e2e\] - - files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$ - - not: - or: - - status-success = cpu-e2e - - status-success = ci-v2/e2e-default - - or: - - status-failure = cpu-e2e - - status-failure = ci-v2/e2e-default + - and: + - -title~=\[skip e2e\] + - files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$ + - not: + or: + - status-success = cpu-e2e + - status-success = ci-v2/e2e-default + - or: + - status-failure = cpu-e2e + - status-failure = ci-v2/e2e-default actions: label: remove: @@ -465,71 +349,71 @@ pull_request_rules: # Comprehensive failure logic: remove ci-passed when any required system fails - or: # Build systems: remove if no success AND has failure - - and: - - not: - or: - - status-success = Build and test AMD64 Ubuntu 22.04 - - status-success = ci-v2/build - - or: - - status-failure = Build and test AMD64 Ubuntu 22.04 - - status-failure = ci-v2/build + - and: + - not: + or: + - status-success = Build and test AMD64 Ubuntu 22.04 + - status-success = ci-v2/build + - or: + - status-failure = Build and test AMD64 Ubuntu 22.04 + - status-failure = ci-v2/build # Go unit tests: remove if no success AND has failure - - and: - - not: - or: - - status-success = UT for Go - - status-success = ci-v2/ut-go - - or: - - status-failure = UT for Go - - status-failure = ci-v2/ut-go + - and: + - not: + or: + - status-success = UT for Go + - status-success = ci-v2/ut-go + - or: + - status-failure = UT for Go + - status-failure = ci-v2/ut-go # Integration tests: remove if no success AND has failure - - and: - - not: - or: - - status-success = Integration Test - - status-success = ci-v2/integration-test - - or: - - status-failure = Integration Test - - status-failure = ci-v2/integration-test + - and: + - not: + or: + - status-success = Integration Test + - status-success = ci-v2/integration-test + - or: + - status-failure = Integration Test + - status-failure = ci-v2/integration-test # Cpp unit tests: remove if no success AND has failure (only when cpp files changed) - - and: - - *morethan_go_unittest_files - - not: - or: - - status-success = cpp-unit-test - - status-success = ci-v2/ut-cpp - - or: - - status-failure = cpp-unit-test - - status-failure = ci-v2/ut-cpp + - and: + - *morethan_go_unittest_files + - not: + or: + - status-success = cpp-unit-test + - status-success = ci-v2/ut-cpp + - or: + - status-failure = cpp-unit-test + - status-failure = ci-v2/ut-cpp # Code checker Ubuntu: remove if no success AND has failure - - and: - - not: - or: - - status-success = Code Checker AMD64 Ubuntu 22.04 - - status-success = ci-v2/code-check - - or: - - status-failure = Code Checker AMD64 Ubuntu 22.04 - - status-failure = ci-v2/code-check + - and: + - not: + or: + - status-success = Code Checker AMD64 Ubuntu 22.04 + - status-success = ci-v2/code-check + - or: + - status-failure = Code Checker AMD64 Ubuntu 22.04 + - status-failure = ci-v2/code-check # E2E tests: regular case - remove if no success AND has failure - - and: - - not: - or: - - status-success = cpu-e2e - - status-success = ci-v2/e2e-default - - or: - - status-failure = cpu-e2e - - status-failure = ci-v2/e2e-default + - and: + - not: + or: + - status-success = cpu-e2e + - status-success = ci-v2/e2e-default + - or: + - status-failure = cpu-e2e + - status-failure = ci-v2/e2e-default # E2E tests: required case - remove if no success AND has failure (when not skipped) - - and: - - -title~=\[skip e2e\] - - files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$ - - not: - or: - - status-success = cpu-e2e - - status-success = ci-v2/e2e-default - - or: - - status-failure = cpu-e2e - - status-failure = ci-v2/e2e-default + - and: + - -title~=\[skip e2e\] + - files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$ + - not: + or: + - status-success = cpu-e2e + - status-success = ci-v2/e2e-default + - or: + - status-failure = cpu-e2e + - status-failure = ci-v2/e2e-default actions: label: remove: @@ -567,14 +451,14 @@ pull_request_rules: - -body~=\#[0-9]{1,6}(\s+|$) - -body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$) - or: - - and: - - label=kind/enhancement - - or: - - label=size/L - - label=size/XL - - label=size/XXL - - label=kind/bug - - label=kind/feature + - and: + - label=kind/enhancement + - or: + - label=size/L + - label=size/XL + - label=size/XXL + - label=kind/bug + - label=kind/feature - -label=kind/doc - -label=kind/test - -title~=\[automated\] @@ -601,8 +485,8 @@ pull_request_rules: - name: Blocking PR if missing a related master PR or doesn't have kind/branch-feature label conditions: - or: - - *2X_BRANCH - - *3X_BRANCH + - *2X_BRANCH + - *3X_BRANCH - and: - -body~=pr\:\ \#[0-9]{1,6}(\s+|$) - -body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$) @@ -619,8 +503,8 @@ pull_request_rules: - name: Dismiss block label if related pr be added into PR conditions: - or: - - *2X_BRANCH - - *3X_BRANCH + - *2X_BRANCH + - *3X_BRANCH - or: - body~=pr\:\ \#[0-9]{1,6}(\s+|$) - body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$) @@ -686,8 +570,8 @@ pull_request_rules: conditions: - or: *BRANCHES - or: - - '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|build\(deps\):|\[automated\])' - - body=^$ + - '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|build\(deps\):|\[automated\])' + - body=^$ actions: label: add: @@ -877,4 +761,4 @@ pull_request_rules: - lgtm - approved - +