Skip to content

Coverage upload returns 500 while test results upload succeeds (same repo, same auth) #1945

Description

@rhuanbarreto

Description

Coverage data uploads consistently return HTTP 500 from Codecov's server, while test results uploads for the same commit, same repo, same auth method succeed. This happens on both the new ingest endpoint and the legacy V4 endpoint.

Environment

  • codecov-action: v6.0.0 (57e3a136b779b570ffcdbf80b3bdc90e7fab3de2)
  • Codecov CLI: v11.2.8 (downloaded at runtime)
  • OS: ubuntu-latest (GitHub Actions)
  • Auth: OIDC (also tested with repository token — same result)
  • Coverage format: LCOV (generated by Bun test runner)
  • Repo: archgate/cli (public)

Reproduction

Workflow config (simplified):

# Coverage upload — FAILS with 500
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2
  with:
    use_oidc: true
    slug: archgate/cli
    files: coverage/lcov.info
    disable_search: true

# Test results upload — SUCCEEDS
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2
  with:
    use_oidc: true
    slug: archgate/cli
    files: coverage/junit.xml
    disable_search: true
    report_type: test_results

Verbose logs (from CI run)

Coverage upload (fails)

The CLI goes through upload-coverage which hits the ingest endpoint directly:

info -- Found 1 coverage files to report
debug -- Found 395 network files to report, (395 without filtering)
warning -- Response status code was 500. --- {"retry": 0}
warning -- Request failed. Retrying --- {"retry": 0}
warning -- Response status code was 500. --- {"retry": 1}
warning -- Request failed. Retrying --- {"retry": 1}
warning -- Response status code was 500. --- {"retry": 2}
warning -- Request failed. Retrying --- {"retry": 2}
Exception: Request failed after too many retries. URL: https://ingest.codecov.io/upload/github/archgate::::cli/upload-coverage

With use_legacy_upload_endpoint: true (also fails)

The legacy path successfully creates the commit and report, but the actual data upload still 500s:

debug -- Starting create commit process
info -- Commit creating complete
debug -- Commit creating result --- {"result": "RequestResult(error=None, warnings=[], status_code=202, ...)"}
debug -- Starting create report process
info -- Report creating complete
debug -- Report creating result --- {"result": "RequestResult(error=None, warnings=[], status_code=202, ...)"}
debug -- Selected uploader to use: <class 'codecov_cli.services.upload.legacy_upload_sender.LegacyUploadSender'>
warning -- Response status code was 500. --- {"retry": 0}
warning -- Response status code was 500. --- {"retry": 1}
warning -- Response status code was 500. --- {"retry": 2}
Exception: Request failed after too many retries. URL: https://codecov.io/upload/v4

Test results upload (succeeds — same commit, same auth)

debug -- Starting create commit process
info -- Commit creating complete (202)
debug -- Starting upload processing
debug -- Upload request to Codecov complete. --- {"response": {"raw_upload_location": "https://storage.googleapis.com/codecov-production/test_results/v1/raw/..."}}
info -- Sending upload (32700 bytes) to storage
info -- Upload queued for processing complete (200)

Key observation

The test results path uses UploadSender which gets a signed GCS URL and uploads directly to Google Cloud Storage — this works.

The coverage path uses either the streaming ingest endpoint or LegacyUploadSender — both return 500 from Codecov's server.

The create-commit and create-report API calls succeed (202) for both paths, so authentication and repo resolution are working. The 500 is specifically in the coverage data upload/processing step.

CI runs with full logs

Codecov UI message

After the failed upload, the Codecov commit page shows:

No coverage data is available due to incomplete uploads on the first attempt.

What we've tried

  • ✅ Repository token (not global/org token)
  • ✅ OIDC authentication
  • ✅ Explicit slug: archgate/cli
  • disable_search: true
  • use_legacy_upload_endpoint: true
  • ✅ New commits (Codecov requires fresh commits after failed uploads)
  • ❌ All produce the same 500 on coverage upload; test results always succeed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions