From ea5b0e9d535a2b4d776a4b5c962c3a0e772f0899 Mon Sep 17 00:00:00 2001 From: Amarjeet LNU Date: Sat, 18 Jul 2026 12:54:52 -0700 Subject: [PATCH] fix: remove codecov after_n_builds so single-submodule PRs report coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- codecov.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/codecov.yml b/codecov.yml index 30328aef30..0ff9902463 100644 --- a/codecov.yml +++ b/codecov.yml @@ -12,10 +12,14 @@ # The `ignore:` list below scopes the Codecov report to product code only. codecov: - # Wait for all four sub-package unit-test jobs to upload before finalizing, so the - # project % is computed over the complete report rather than whichever job lands first. + # Finalize the report only after CI completes. Do NOT pin a fixed upload count: + # this repo's CI runs unit tests per CHANGED submodule (detect-changes), so a PR + # touching only 1-3 submodules produces fewer than 4 uploads. A fixed + # `after_n_builds: 4` would make Codecov wait forever on those PRs and never post a + # report (observed on PR #6055, which changed only sagemaker-mlops: state=error, + # sessions=0, no status). `wait_for_ci: true` alone waits for CI and finalizes + # whatever uploaded, regardless of submodule count. notify: - after_n_builds: 4 wait_for_ci: true coverage: