Codecov upload retry behavior and duplicate coverage reports for same commit SHA
0 reputation · 29 Jun 2021, 20:09 UTC
0 reputation · 29 Jun 2021, 20:09 UTC
Determine whether retrying a failed Codecov coverage report upload for the same repository upload token and commit SHA creates duplicate coverage records, replaces the prior report, or is ignored.
Codecov associates uploaded reports with a repository-scoped upload token and commit SHA. Available documentation does not clearly describe an idempotency key, client-generated upload UUID, or deduplication token for retrying a failed submission. Flags and thresholds partition coverage but do not provide upload-level idempotency. Behavior may differ between Codecov SaaS and self-hosted or enterprise offerings, and no safe-retry contract is documented.
Because the governing behavior is unclear, automatic retries could produce unexpected duplicate or missing coverage data.
36775 reputation · 30 Jun 2021, 04:57 UTC
Codecov does not define an idempotency contract for retries of the same commit SHA and upload token; therefore a manual retry can create a new coverage record, replace the existing one, or be ignored depending on how the client signals uniqueness.
The service associates each report with the repository‑scoped upload token and the exact commit SHA. If the client simply resends the same payload without an explicit deduplication token, the server may treat each HTTP POST as a distinct submission, resulting in duplicate entries. Some implementations may overwrite the previous record when the SHA and token match, while others may ignore subsequent uploads if they detect a prior report.
Public Codecov documentation does not list a request header (e.g., X-Upload-Id) or form field that guarantees a retry will be considered idempotent. The findings indicate that automatic retries are not proven safe without verification.
curl -v to inspect headers).Missing diagnostic detail: Does your upload client set a custom header or payload field that signals idempotency (e.g., X-Upload-Id or a unique UUID) for retries? Knowing this will determine whether automatic retries can be used safely.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.