airbyte-source-github 1.8.34__tar.gz → 1.8.35.dev202507171002__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of airbyte-source-github might be problematic. Click here for more details.

Files changed (63) hide show
  1. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/PKG-INFO +1 -1
  2. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/pyproject.toml +1 -1
  3. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/backoff_strategies.py +18 -6
  4. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/README.md +0 -0
  5. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/__init__.py +0 -0
  6. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/config_migrations.py +0 -0
  7. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/constants.py +0 -0
  8. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/errors_handlers.py +0 -0
  9. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/github_schema.py +0 -0
  10. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/graphql.py +0 -0
  11. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/run.py +0 -0
  12. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/assignees.json +0 -0
  13. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/branches.json +0 -0
  14. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/collaborators.json +0 -0
  15. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/comments.json +0 -0
  16. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/commit_comment_reactions.json +0 -0
  17. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/commit_comments.json +0 -0
  18. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/commits.json +0 -0
  19. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/contributor_activity.json +0 -0
  20. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/deployments.json +0 -0
  21. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/events.json +0 -0
  22. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_comment_reactions.json +0 -0
  23. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_events.json +0 -0
  24. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_labels.json +0 -0
  25. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_milestones.json +0 -0
  26. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_reactions.json +0 -0
  27. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issue_timeline_events.json +0 -0
  28. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/issues.json +0 -0
  29. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/organizations.json +0 -0
  30. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/project_cards.json +0 -0
  31. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/project_columns.json +0 -0
  32. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/projects.json +0 -0
  33. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/projects_v2.json +0 -0
  34. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/pull_request_comment_reactions.json +0 -0
  35. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/pull_request_commits.json +0 -0
  36. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/pull_request_stats.json +0 -0
  37. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/pull_requests.json +0 -0
  38. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/releases.json +0 -0
  39. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/repositories.json +0 -0
  40. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/review_comments.json +0 -0
  41. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/reviews.json +0 -0
  42. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/events/comment.json +0 -0
  43. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/events/commented.json +0 -0
  44. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/events/committed.json +0 -0
  45. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/events/cross_referenced.json +0 -0
  46. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/events/reviewed.json +0 -0
  47. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/reaction.json +0 -0
  48. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/reactions.json +0 -0
  49. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/user.json +0 -0
  50. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/shared/user_graphql.json +0 -0
  51. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/stargazers.json +0 -0
  52. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/tags.json +0 -0
  53. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/team_members.json +0 -0
  54. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/team_memberships.json +0 -0
  55. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/teams.json +0 -0
  56. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/users.json +0 -0
  57. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/workflow_jobs.json +0 -0
  58. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/workflow_runs.json +0 -0
  59. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/schemas/workflows.json +0 -0
  60. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/source.py +0 -0
  61. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/spec.json +0 -0
  62. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/streams.py +0 -0
  63. {airbyte_source_github-1.8.34 → airbyte_source_github-1.8.35.dev202507171002}/source_github/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-github
3
- Version: 1.8.34
3
+ Version: 1.8.35.dev202507171002
4
4
  Summary: Source implementation for GitHub.
5
5
  License: MIT
6
6
  Author: Airbyte
@@ -5,7 +5,7 @@ requires = [
5
5
  build-backend = "poetry.core.masonry.api"
6
6
 
7
7
  [tool.poetry]
8
- version = "1.8.34"
8
+ version = "1.8.35.dev202507171002"
9
9
  name = "airbyte-source-github"
10
10
  description = "Source implementation for GitHub."
11
11
  authors = [
@@ -9,9 +9,16 @@ import requests
9
9
 
10
10
  from airbyte_cdk import BackoffStrategy
11
11
  from airbyte_cdk.sources.streams.http import HttpStream
12
+ from airbyte_cdk.utils import AirbyteTracedException
13
+ from airbyte_protocol.models import FailureType
12
14
 
13
15
 
14
16
  class GithubStreamABCBackoffStrategy(BackoffStrategy):
17
+ min_backoff_time = 60.0
18
+ min_backoff_time_when_refreshing_auth_token = 60.0 * 10 # 10 minutes as default and as default time for access token live period
19
+ # 3600 - max seconds between messages from metadata
20
+ max_seconds_between_messages = 3600.0
21
+
15
22
  def __init__(self, stream: HttpStream, **kwargs): # type: ignore # noqa
16
23
  self.stream = stream
17
24
  super().__init__(**kwargs)
@@ -23,24 +30,29 @@ class GithubStreamABCBackoffStrategy(BackoffStrategy):
23
30
  # `X-RateLimit-Reset` header which contains time when this hour will be finished and limits will be reset so
24
31
  # we again could have 5000 per another hour.
25
32
  if isinstance(response_or_exception, requests.Response):
26
- min_backoff_time = 60.0
27
33
  retry_after = response_or_exception.headers.get("Retry-After")
28
34
  if retry_after is not None:
29
- backoff_time_in_seconds = max(float(retry_after), min_backoff_time)
35
+ backoff_time_in_seconds = max(float(retry_after), self.min_backoff_time)
30
36
  return self.get_waiting_time(backoff_time_in_seconds)
31
37
 
32
38
  reset_time = response_or_exception.headers.get("X-RateLimit-Reset")
33
39
  if reset_time:
34
- backoff_time_in_seconds = max(float(reset_time) - time.time(), min_backoff_time)
40
+ backoff_time_in_seconds = max(float(reset_time) - time.time(), self.min_backoff_time)
35
41
  return self.get_waiting_time(backoff_time_in_seconds)
36
42
  return None
37
43
 
38
- def get_waiting_time(self, backoff_time_in_seconds: Optional[float]) -> Optional[float]:
44
+ def get_waiting_time(self, backoff_time_in_seconds: float) -> Optional[float]:
39
45
  if backoff_time_in_seconds < 60 * 10: # type: ignore[operator]
40
46
  return backoff_time_in_seconds
47
+ elif backoff_time_in_seconds > self.max_seconds_between_messages:
48
+ raise AirbyteTracedException(
49
+ internal_message="Waiting time from header is too long.",
50
+ message=f"The stream {self.stream.name} have faced rate limits, but waiting time is too long. The stream will sync data in the next sync when rate limits are refreshed.",
51
+ failure_type=FailureType.transient_error,
52
+ )
41
53
  else:
42
- self.stream._http_client._session.auth.update_token() # New token will be used in next request
43
- return 1
54
+ self.stream._http_client._session.auth.update_token() # New token will be used in the next request
55
+ return self.stream._http_client._session.auth.max_time or self.min_backoff_time_when_refreshing_auth_token
44
56
 
45
57
 
46
58
  class ContributorActivityBackoffStrategy(BackoffStrategy):