Skip to content

fix(ci): preserve selectively collected coverage - #3343

Merged
imbajin merged 4 commits into
apache:masterfrom
hugegraph:fix/ci-coverage-flags
Oct 14, 2026
Merged

imbajin merged 4 commits into
apache:masterfrom
hugegraph:fix/ci-coverage-flags

Conversation

@imbajin

@imbajin imbajin commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Selective CI uploads only the test groups it executes, so treating each partial upload as a complete project report can show artificial coverage changes.

Each existing upload now has a stable test-group flag. .github/codecov.yml enables native carryforward and labels historical data in PR comments. Groups can retain previous coverage when Codecov finds a flagged report through its recorded parent chain; actual test results, upload paths and coverage thresholds stay intact.

Limitation: master remains smoke-only and uploads no coverage. Unreported master commits can break that recorded chain, so a fresh selective PR is not guaranteed to inherit complete project coverage, even after a weekly full run. Weekly validation seeds flags for its own commit; successful carryforward within an existing PR does not establish a durable baseline for future PRs. No extra collector runner or repeated master coverage tests are added.

Both ASF and org master required contexts are empty. The temporary Memory migration reporter and its protection lookup are removed; actual backend jobs now have explicit Memory/RocksDB names. Server source inputs continue selecting both backends.

Validation: policy fixtures, upload contracts, Codecov configuration validation, formatting, clean compilation, RAT and workflow syntax checks passed. Independent review confirmed the implementation and the documented carryforward limitation. Latest-head runtime CI is pending; failures retain their real status.

Conceptual overview

Conceptual selective-coverage example: successful current uploads combine with historical reports where no new report is available. Carryforward requires a complete flagged baseline from successful uploads; a green workflow alone is insufficient. Skipped and failed jobs retain their native test status. Not test or release-acceptance evidence. Carryforward also requires a reachable earlier flagged report in Codecov’s recorded parent chain; weekly seeding alone does not guarantee complete totals for a fresh PR after smoke-only master commits.

Conceptual illustration; not test or release-acceptance evidence.

Current flagged uploads and visibly historical coverage carryforward

- flag each coverage upload and enable native carryforward
- show historical coverage explicitly in Codecov comments
- remove the completed required-check migration bridge
- clarify actual backend checks and baseline initialization
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.48%. Comparing base (92af2f8) to head (9831d66).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3343      +/-   ##
============================================
+ Coverage     54.31%   54.48%   +0.17%     
+ Complexity     2250     2249       -1     
============================================
  Files           770      770              
  Lines         67952    67956       +4     
  Branches       9213     9307      +94     
============================================
+ Hits          36905    37023     +118     
+ Misses        27470    27365     -105     
+ Partials       3577     3568       -9     
Flag Coverage Δ
commons 96.95% <ø> (?)
hstore 35.57% <ø> (?)
pd 49.25% <ø> (?)
server_hbase 41.80% <ø> (?)
server_memory 51.62% <ø> (?)
server_rocksdb 42.23% <ø> (?)
store 31.93% <ø> (?)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin
imbajin marked this pull request as ready for review October 14, 2026 04:54
- place configuration in the supported .github directory
- link coverage documentation to the configuration
- preserve carryforward settings and existing upload jobs
- document the supported .github configuration location
- explain the existing carryforward behavior
- keep the coverage initialization guidance unchanged
Pengzna
Pengzna previously approved these changes Oct 14, 2026

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: yes. Score: 6/10 (10 - 2 for one Important = 8, capped at 6 because a finding is blocking). Summary: The flags, the contract check and the bridge removal are correct, and carryforward works inside this PR. It does not work for a fresh PR, because master pushes upload no coverage and the weekly run is only one commit in a long chain. Evidence: ran test-codecov-upload-config.sh (PASS) and the .github/scripts unittest suite (38 tests OK) at 47ae699. Changing pd-store-ci flags: pd to store makes the contract fail as expected. Checked the master push and dispatch job lists through the Actions API and the master commit list through the public Codecov API. The Codecov parent-walk behaviour is a static reading and was not tested end to end. No status check is required on master; several jobs were still pending and codecov/project reported -0.01% at review time.

Comment thread docs/ci.md Outdated
- describe the recorded parent-chain requirement
- retain smoke-only master pushes without extra uploads
- distinguish weekly flag seeding from fresh PR coverage
@imbajin
imbajin merged commit 06f90a9 into apache:master Oct 14, 2026
19 of 20 checks passed
@imbajin
imbajin deleted the fix/ci-coverage-flags branch October 14, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants