Added fix for GitHub's transient fault issue - #234
Open
akkumar-qlik wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub API client retry behavior to better tolerate GitHub’s documented transient 401 responses, helping discovery/sync complete successfully during short-lived API-side incidents.
Changes:
- Added
BadCredentialsException(401) to theauthed_getbackoff retry exceptions and documented the rationale inline. - Updated unit test expectations to assert 401s are retried up to
max_tries=5. - Bumped package version to
3.4.1and documented the change inCHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tap_github/client.py |
Adds 401 (BadCredentialsException) to backoff retry tuple and documents why. |
tests/unittests/test_exception_handling.py |
Updates expected retry call count for 401 responses and adjusts test docstring. |
setup.py |
Bumps package version from 3.4.0 to 3.4.1. |
CHANGELOG.md |
Adds release notes for 3.4.1 describing the transient 401 retry change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
77
to
81
| """ | ||
| - Verify that `authed_get` raises an error with the proper message for different error codes. | ||
| - Verify that tap retries 5 times for Server5xxError and RateLimitExceeded error. | ||
| - Verify that tap retries 5 times for Server5xxError, TooManyRequests, | ||
| and transient 401 BadCredentialsException. | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
https://qlik-dev.atlassian.net/browse/SAC-31798
Added BadCredentialsException to the backoff retry tuple in client.py:203.
Added inline rationale in client.py:199 documenting why 401 retries are needed for transient GitHub faults.
Updated unit test expectation for 401 retry behavior in
Manual QA steps
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code