|
1 | | -# Codecov server-side configuration for ProxySQL. |
| 1 | +# Codecov configuration for ProxySQL. |
2 | 2 | # |
3 | | -# --------------------------------------------------------------------------- |
4 | | -# Coverage path alignment (the `fixes` block below) |
5 | | -# --------------------------------------------------------------------------- |
6 | | -# ProxySQL uploads coverage to Codecov from two independent pipelines that |
7 | | -# historically disagreed on the *root* of every source path, which left the |
8 | | -# daemon's lib/ coverage filed under a phantom folder Codecov could not align |
9 | | -# to the git tree. Symptom: lib/MySQL_Monitor.cpp (and every other daemon-only |
10 | | -# file) showing a flat 0% on https://app.codecov.io/gh/sysown/proxysql even |
11 | | -# though the integration suite exercises it heavily. |
| 3 | +# Path contract (both upload pipelines MUST emit the same shape): |
12 | 4 | # |
13 | | -# The two pipelines: |
| 5 | +# TAP integration (flags tap-*) |
| 6 | +# test/infra/control/run-tests-isolated.bash normalizes every LCOV SF: |
| 7 | +# path to repo-root-relative form (lib/MySQL_Monitor.cpp, src/main.cpp, |
| 8 | +# test/tap/..., include/...). |
14 | 9 | # |
15 | | -# 1. TAP integration groups (flags `tap-*`) |
16 | | -# test/infra/control/run-tests-isolated.bash rewrites every LCOV `SF:` |
17 | | -# path to a `proxysql/`-prefixed form (e.g. `proxysql/lib/MySQL_Monitor.cpp`). |
18 | | -# The prefix matches the CI checkout layout — the repo is checked out into |
19 | | -# a `proxysql/` subdirectory of the runner workspace, and codecov-cli's |
20 | | -# network-file listing is rooted one level above it — but it does NOT match |
21 | | -# the repository git tree, whose root holds lib/, src/, include/, test/. |
| 10 | +# Unit tests (flag unit-tests) |
| 11 | +# test/infra/control/run-unit-tests-asan-coverage.bash already emits |
| 12 | +# repo-root-relative paths (lcov --directory lib). |
22 | 13 | # |
23 | | -# 2. Unit tests (flag `unit-tests`) |
24 | | -# test/infra/control/run-unit-tests-asan-coverage.bash captures with |
25 | | -# `lcov --capture --directory lib`, producing repo-root-relative paths |
26 | | -# (`lib/MySQL_Monitor.cpp`). A `--initial` baseline seeds every instrumented |
27 | | -# line at 0%, so files the unit tests never execute (the monitor thread, |
28 | | -# the admin handler, the session loop, ...) sit at 0% in this namespace. |
| 14 | +# Historically TAP prefixed paths with proxysql/ (matching the CI checkout |
| 15 | +# subdirectory). That created a phantom proxysql/ namespace on Codecov that |
| 16 | +# never merged with unit-tests lib/, so daemon-only files like |
| 17 | +# lib/MySQL_Monitor.cpp showed 0% despite thousands of real TAP hits. |
| 18 | +# The TAP sed rewrite and the GH-Actions codecov-action settings |
| 19 | +# (no network_prefix, disable_search, plugins:noop, root_dir:proxysql) |
| 20 | +# keep both pipelines on the git-tree path scheme. |
29 | 21 | # |
30 | | -# Because the TAP coverage landed under `proxysql/lib/...` and the unit-tests |
31 | | -# baseline owned `lib/...`, the two never merged: browsing the canonical repo |
32 | | -# path `lib/MySQL_Monitor.cpp` showed only the unit-tests 0% baseline, while the |
33 | | -# real ~38% from the TAP daemon was orphaned (and ultimately dropped) under the |
34 | | -# non-existent `proxysql/lib/` tree. |
35 | | -# |
36 | | -# `fixes` strips the `proxysql/` prefix from report paths during Codecov's |
37 | | -# server-side processing, so the TAP namespace collapses onto the git-tree |
38 | | -# paths (`proxysql/lib/MySQL_Monitor.cpp` -> `lib/MySQL_Monitor.cpp`) and merges |
39 | | -# with the unit-tests sessions. Verified against a real `tap-legacy-g1` upload: |
40 | | -# all 210 `SF:` paths resolve to an existing repo file after the strip, with |
41 | | -# zero misses. The rule only matches paths beginning with `proxysql/`, so the |
42 | | -# already-correct `unit-tests` paths (`lib/...`, `include/...`) are untouched. |
43 | | -# |
44 | | -# If the TAP pipeline is ever changed to emit repo-root-relative paths directly |
45 | | -# (the cleaner long-term fix, which also needs the codecov-action `root_dir` |
46 | | -# pointed at the checkout subdir in the reusable ci-*.yml workflows on the |
47 | | -# GH-Actions branch), this rule becomes a harmless no-op and can be removed. |
| 22 | +# fixes: kept as a safety net for any leftover proxysql/-prefixed SF: lines |
| 23 | +# from older artifacts or partial rollouts. Becomes a no-op once every |
| 24 | +# producer emits repo-root paths. |
| 25 | + |
| 26 | +codecov: |
| 27 | + # GitHub default branch is v3.0 (master is stale and has no codecov.yml). |
| 28 | + branch: v3.0 |
| 29 | + |
48 | 30 | fixes: |
49 | 31 | - "proxysql/::" |
| 32 | + |
| 33 | +# Vendored test dependencies (Boost, googletest, etc.) drown out daemon |
| 34 | +# coverage. Keep test/tap/** included -- those are first-party TAP sources. |
| 35 | +ignore: |
| 36 | + - "test/deps/**" |
0 commit comments