From 0f462c1ced7da1e61d28b715565bfc165a855de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E9=B9=8F=E5=B8=86?= Date: Wed, 8 Apr 2026 11:33:40 +0800 Subject: [PATCH] fix(ci): use master Docker image for v2.5 branch only Docker images like `thirdparties-bin-test-ubuntu2204-v2.5` don't exist for release branches, causing CI startup failures. This change uses GitHub Actions conditional expressions to use master branch images only for v2.5 PRs, while other branches use their own branch-specific images. Changes: - Updated image tags with conditional: `${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}` - Affected jobs: Tidy, IWYU, Build/Test Release, ASAN, jemalloc, Rockylinux9 - Restored clang-tidy to compare against origin/base_ref Notes: - master, ci-test, *dev branches continue using their own images - Only v2.5 (and future release branches without images) use master fallback --- .github/workflows/lint_and_test_cpp.yaml | 30 +++++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml index 31f83b4138..729c6dce5b 100644 --- a/.github/workflows/lint_and_test_cpp.yaml +++ b/.github/workflows/lint_and_test_cpp.yaml @@ -15,6 +15,9 @@ # specific language governing permissions and limitations # under the License. +# NOTE: Docker images use 'master' branch tag for release branches (e.g., v2.5) +# that may not have prebuilt Docker images. Other branches use their own images. + name: Cpp CI on: @@ -64,7 +67,8 @@ jobs: USE_JEMALLOC: OFF ENABLE_ASAN: OFF container: - image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - name: Install Softwares run: | @@ -91,7 +95,8 @@ jobs: USE_JEMALLOC: OFF ENABLE_ASAN: OFF container: - image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - uses: actions/checkout@v4 - name: Free Disk Space (Ubuntu) @@ -123,7 +128,8 @@ jobs: ARTIFACT_NAME: release BUILD_OPTIONS: -t release --test container: - image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - name: Clone code uses: actions/checkout@v4 @@ -193,7 +199,8 @@ jobs: env: ARTIFACT_NAME: release container: - image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} options: --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v4 @@ -213,7 +220,8 @@ jobs: ARTIFACT_NAME: release_address BUILD_OPTIONS: --sanitizer address --disable_gperf --test container: - image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - uses: actions/checkout@v4 - name: Rebuild thirdparty if needed @@ -284,7 +292,8 @@ jobs: env: ARTIFACT_NAME: release_address container: - image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} options: --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v4 @@ -394,7 +403,8 @@ jobs: ARTIFACT_NAME: release_jemalloc BUILD_OPTIONS: -t release --use_jemalloc --test container: - image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - uses: actions/checkout@v4 - name: Rebuild thirdparty if needed @@ -417,7 +427,8 @@ jobs: env: ARTIFACT_NAME: release_jemalloc container: - image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} options: --cap-add=SYS_PTRACE steps: - uses: actions/checkout@v4 @@ -472,7 +483,8 @@ jobs: BUILD_OPTIONS: -t debug --test --separate_servers PACK_OPTIONS: --separate_servers container: - image: apache/pegasus:thirdparties-bin-rockylinux9-${{ github.base_ref }} + # Use master image for v2.5 branch (which lacks prebuilt images), others use their own + image: apache/pegasus:thirdparties-bin-rockylinux9-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }} steps: - name: Clone code uses: actions/checkout@v3