Skip to content

Bug 2027142 - The github-etl script is failing due to various errors such as bad credentials, network connection closed, etc.#17

Open
dklawren wants to merge 2 commits intomainfrom
2027142
Open

Bug 2027142 - The github-etl script is failing due to various errors such as bad credentials, network connection closed, etc.#17
dklawren wants to merge 2 commits intomainfrom
2027142

Conversation

@dklawren
Copy link
Copy Markdown
Contributor

@dklawren dklawren commented Apr 8, 2026

No description provided.

…such as bad credentials, network connection closed, etc.
Copilot AI review requested due to automatic review settings April 8, 2026 16:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the github-etl orchestration and GitHub API access layer to better tolerate transient failures (network issues, 5xxs, HTML error pages) and expired/invalid credentials, while expanding the test suite to cover the new behaviors.

Changes:

  • Add robust retry/backoff + request timeouts to github_get, including optional auth refresh on 401s and HTML error-page detection.
  • Propagate refresh_auth through extraction helpers and make _main() continue processing subsequent repos after a repo-level failure, returning a partial-failure exit code.
  • Update/add tests for retries and orchestration flows; remove GITHUB_TOKEN usage from tests and docker-compose.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
main.py Adds retry/backoff/timeouts in github_get, threads refresh_auth through extractors, and continues ETL across repos on failure.
tests/test_main.py Updates orchestration tests to run without auth env vars; adds a repo-failure-continues test.
tests/test_main_integration.py Adds a broad set of orchestration/integration-style tests (currently largely duplicative of tests/test_main.py).
tests/test_github_get.py Adds focused tests for retry behaviors (5xx, connection errors, 401 refresh, HTML error pages).
tests/test_logging.py Adds a test validating setup_logging() configuration.
tests/test_extract_pull_requests.py Adjusts tests to align with new retry behavior and header expectations.
tests/test_extract_commits.py Adjusts tests to align with new retry behavior and header expectations.
tests/test_extract_reviewers.py Adjusts tests to align with new retry behavior and header expectations.
tests/test_extract_comments.py Ensures mocked responses include headers used by HTML detection.
docker-compose.yml Removes GITHUB_TOKEN env var from the compose example (token no longer used).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dklawren dklawren requested review from cgsheeh and shtrom April 8, 2026 18:56
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.

2 participants