Skip to content

Commit ee8bf12

Browse files
authored
fix: remove codecov after_n_builds so single-submodule PRs report coverage (#6056)
`after_n_builds: 4` made Codecov wait for four coverage uploads before finalizing a report. But this repo's CI runs unit tests only for the submodules a PR changes (detect-changes), so a PR touching 1-3 submodules produces fewer than four uploads. Codecov then waits forever and never posts a report or status. Observed on PR #6055 (changed only sagemaker-mlops): the mlops unit-test job uploaded coverage successfully, but Codecov reported state=error, sessions=0 and posted no codecov/project or codecov/patch status, because it was still waiting for three more uploads that never come. Drop the fixed count and rely on `wait_for_ci: true`, which finalizes the report once CI completes using whatever uploaded — correct for this repo's dynamic per-submodule CI.
1 parent 368a1a9 commit ee8bf12

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎codecov.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
# The `ignore:` list below scopes the Codecov report to product code only.
1313

1414
codecov:
15-
# Wait for all four sub-package unit-test jobs to upload before finalizing, so the
16-
# project % is computed over the complete report rather than whichever job lands first.
15+
# Finalize the report only after CI completes. Do NOT pin a fixed upload count:
16+
# this repo's CI runs unit tests per CHANGED submodule (detect-changes), so a PR
17+
# touching only 1-3 submodules produces fewer than 4 uploads. A fixed
18+
# `after_n_builds: 4` would make Codecov wait forever on those PRs and never post a
19+
# report (observed on PR #6055, which changed only sagemaker-mlops: state=error,
20+
# sessions=0, no status). `wait_for_ci: true` alone waits for CI and finalizes
21+
# whatever uploaded, regardless of submodule count.
1722
notify:
18-
after_n_builds: 4
1923
wait_for_ci: true
2024

2125
coverage:

0 commit comments

Comments
 (0)