Skip to content

crashdb_impl: improve GitHub API robustness#637

Open
Arnab-atra wants to merge 5 commits into
canonical:mainfrom
Arnab-atra:github-api-robustness
Open

crashdb_impl: improve GitHub API robustness#637
Arnab-atra wants to merge 5 commits into
canonical:mainfrom
Arnab-atra:github-api-robustness

Conversation

@Arnab-atra

Copy link
Copy Markdown

Summary

This change improves the robustness of the GitHub crash database implementation.

Changes

  • Add appropriate Content-Type headers.
  • Request JSON responses for OAuth endpoints.
  • Improve type annotations using Mapping[str, Any].
  • Decode responses before parsing JSON.
  • Preserve tracebacks by using raise.
  • Handle missing OAuth interval values safely.
  • Make repository and label handling more robust.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.85714% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.96%. Comparing base (d9d3c9f) to head (3236b15).

Files with missing lines Patch % Lines
tests/integration/test_github.py 0.00% 22 Missing ⚠️
apport/crashdb_impl/github.py 61.53% 5 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (d9d3c9f) and HEAD (3236b15). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (d9d3c9f) HEAD (3236b15)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #637       +/-   ##
===========================================
- Coverage   84.47%   29.96%   -54.51%     
===========================================
  Files         106       90       -16     
  Lines       21053    19778     -1275     
  Branches     3223     2956      -267     
===========================================
- Hits        17784     5926    -11858     
- Misses       2792    13348    +10556     
- Partials      477      504       +27     

☔ 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.

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.

1 participant