This is an automated email from the ASF dual-hosted git repository.
jihuayu pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 01c3426ac ci: exclude kvrocks2redis from sonar coverage (#3512)
01c3426ac is described below
commit 01c3426ac7a7c35e8898029c6101228ac91f5663
Author: 纪华裕 <[email protected]>
AuthorDate: Mon Jun 8 19:46:41 2026 +0800
ci: exclude kvrocks2redis from sonar coverage (#3512)
The previous go test code coverage data could be overwritten by the
coverage data from kvrocks2redis, which caused the overall coverage
metric to be lower than expected.
This PR disables the `kvrocks2redis` tests in the SonarCloud coverage
job to prevent them from corrupting gcov data generated by the main C++
and Go tests.
Assisted-by: Codex/GPT5.5 xhigh
---
.github/workflows/kvrocks.yaml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index 13f8f282e..e5500cf5b 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -367,7 +367,9 @@ jobs:
run: |
build-wrapper-linux-x86-64 --out-dir ${{ env.SONARCLOUD_OUTPUT_DIR
}} ./x.py build -j$NPROC --compiler ${{ matrix.compiler }} --skip-build
--dep-dir ${{ env.KVROCKS_DEPS_CACHE_DIR }}
cp -r build _build
- build-wrapper-linux-x86-64 --out-dir ${{ env.SONARCLOUD_OUTPUT_DIR
}} ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{
matrix.sonarcloud }} --dep-dir ${{ env.KVROCKS_DEPS_CACHE_DIR }}
+ ./x.py build -j$NPROC --compiler ${{ matrix.compiler }} ${{
matrix.sonarcloud }} --skip-build --dep-dir ${{ env.KVROCKS_DEPS_CACHE_DIR }}
+ # x.py's default build targets include kvrocks2redis; keep it out of
SonarCloud coverage.
+ build-wrapper-linux-x86-64 --out-dir ${{ env.SONARCLOUD_OUTPUT_DIR
}} cmake --build build --parallel $NPROC --target kvrocks unittest
- name: Build Kvrocks (RISC-V)
if: ${{ matrix.riscv_toolchain }}
@@ -413,8 +415,9 @@ jobs:
- name: Run kvrocks2redis Test
# Currently, when enabling Tsan/Asan or running in macOS 11/14, the
value mismatch in destination redis server.
+ # It also stays out of the SonarCloud matrix so kvrocks2redis
execution does not affect coverage.
# See https://github.com/apache/kvrocks/issues/2195.
- if: ${{ !contains(matrix.name, 'Tsan') && !contains(matrix.name,
'Asan') && !startsWith(matrix.os, 'macos') }}
+ if: ${{ !contains(matrix.name, 'Tsan') && !contains(matrix.name,
'Asan') && !startsWith(matrix.os, 'macos') && !matrix.sonarcloud }}
run: |
ulimit -c unlimited
export LSAN_OPTIONS="suppressions=$(realpath
./tests/lsan-suppressions)"