You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "atharvalade (via GitHub)" <gi...@apache.org> on 2026/03/04 18:43:55 UTC
[PR] fix(ci): use cargo-llvm-cov properly for Python SDK coverage in Codecov [iggy]
atharvalade opened a new pull request, #2867:
URL: https://github.com/apache/iggy/pull/2867
## Which issue does this PR close?
Closes #2816
## Rationale
The Python SDK is built with maturin/PyO3, so all business logic is compiled Rust. The previous two attempts (PR #2790 with pytest-cov, PR #2817 with manual llvm-cov) both failed: pytest-cov cannot measure Rust code, and the manual llvm-cov approach produced 0% coverage due to missing CARGO_TARGET_DIR centralization and LCOV source paths relative to the crate root instead of the repo root.
## What changed?
Coverage reports were empty because raw llvm-profdata/llvm-cov export produced paths like `src/client.rs` while Codecov expected `foreign/python/src/client.rs` under the python flag. Dependency code from core/sdk also leaked into the report with no filtering.
The fix rewrites both post-merge and pre-merge coverage pipelines to use cargo-llvm-cov properly (matching the existing Rust coverage job pattern and the cjermain/rust-python-coverage reference). It sources env vars via `cargo llvm-cov show-env`, centralizes CARGO_TARGET_DIR, drops --release from maturin develop, generates LCOV with `cargo llvm-cov report`, filters dependencies with --ignore-filename-regex, and fixes paths with sed.
## Local Execution
- Passed
- Pre-commit hooks ran
## AI Usage
1. Opus 4.6
2. research, planning
3. Verified by reviewing against the cjermain/rust-python-coverage reference repo, cross-checking env var safety with the existing Rust coverage job, and confirming Codecov path matching with codecov.yml flag configuration
4. Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ci): use cargo-llvm-cov properly for Python SDK coverage in Codecov [iggy]
Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on PR #2867:
URL: https://github.com/apache/iggy/pull/2867#issuecomment-3999776893
pls check there's 2 flaky tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ci): use cargo-llvm-cov properly for Python SDK coverage in Codecov [iggy]
Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio merged PR #2867:
URL: https://github.com/apache/iggy/pull/2867
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ci): use cargo-llvm-cov properly for Python SDK coverage in Codecov [iggy]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2867:
URL: https://github.com/apache/iggy/pull/2867#issuecomment-3999593000
## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/2867?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 67.91%. Comparing base ([`654d94c`](https://app.codecov.io/gh/apache/iggy/commit/654d94cfe45a98132f337706c5ea368f6c1066fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`cc964ae`](https://app.codecov.io/gh/apache/iggy/commit/cc964ae710f7229f4f845e2e14ed774ae2f6e797?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #2867 +/- ##
============================================
- Coverage 67.93% 67.91% -0.03%
Complexity 739 739
============================================
Files 1049 1049
Lines 84376 84376
Branches 60954 60965 +11
============================================
- Hits 57324 57303 -21
- Misses 24693 24702 +9
- Partials 2359 2371 +12
```
| [Flag](https://app.codecov.io/gh/apache/iggy/pull/2867/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [csharp](https://app.codecov.io/gh/apache/iggy/pull/2867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.43% <ø> (-0.19%)` | :arrow_down: |
| [go](https://app.codecov.io/gh/apache/iggy/pull/2867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `6.33% <ø> (ø)` | |
| [java](https://app.codecov.io/gh/apache/iggy/pull/2867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `54.83% <ø> (ø)` | |
| [node](https://app.codecov.io/gh/apache/iggy/pull/2867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `92.26% <ø> (-0.15%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
[see 6 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/2867/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org