airbyte-source-github 2.1.25__tar.gz → 2.1.26__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.
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/PKG-INFO +1 -1
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/pyproject.toml +1 -1
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/errors_handlers.py +24 -2
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/streams.py +4 -10
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/README.md +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/__init__.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/backoff_strategies.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/config_migrations.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/constants.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/github_schema.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/graphql.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/run.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/assignees.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/branches.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/collaborators.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/comments.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/commit_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/commit_comments.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/commits.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/contributor_activity.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/deployments.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/events.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_events.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_labels.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_milestones.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_reactions.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issue_timeline_events.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issues.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/organizations.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/project_cards.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/project_columns.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/projects.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/projects_v2.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/pull_request_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/pull_request_commits.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/pull_request_stats.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/pull_requests.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/releases.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/repositories.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/review_comments.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/reviews.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/events/comment.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/events/commented.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/events/committed.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/events/cross_referenced.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/events/reviewed.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/reaction.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/reactions.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/user.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/user_graphql.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/stargazers.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/tags.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/team_members.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/team_memberships.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/teams.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/users.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/workflow_jobs.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/workflow_runs.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/workflows.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/source.py +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/spec.json +0 -0
- {airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/utils.py +0 -0
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
|
|
|
3
3
|
build-backend = "poetry.core.masonry.api"
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
|
-
version = "2.1.
|
|
6
|
+
version = "2.1.26"
|
|
7
7
|
name = "airbyte-source-github"
|
|
8
8
|
description = "Source implementation for GitHub."
|
|
9
9
|
authors = [ "Airbyte <contact@airbyte.io>",]
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/errors_handlers.py
RENAMED
|
@@ -41,9 +41,13 @@ GITHUB_DEFAULT_ERROR_MAPPING = DEFAULT_ERROR_MAPPING | {
|
|
|
41
41
|
error_message="Conflict.",
|
|
42
42
|
),
|
|
43
43
|
410: ErrorResolution(
|
|
44
|
-
response_action=ResponseAction.
|
|
44
|
+
response_action=ResponseAction.FAIL,
|
|
45
45
|
failure_type=FailureType.config_error,
|
|
46
|
-
error_message=
|
|
46
|
+
error_message=(
|
|
47
|
+
"GitHub returned 410 Gone for an unexpected reason. "
|
|
48
|
+
"The endpoint or API version may be deprecated. "
|
|
49
|
+
"Verify the connector version is current and the endpoint is still supported."
|
|
50
|
+
),
|
|
47
51
|
),
|
|
48
52
|
}
|
|
49
53
|
|
|
@@ -55,6 +59,16 @@ def is_conflict_with_empty_repository(response_or_exception: Optional[Union[requ
|
|
|
55
59
|
return False
|
|
56
60
|
|
|
57
61
|
|
|
62
|
+
def is_gone_with_feature_disabled(response_or_exception: Optional[Union[requests.Response, Exception]] = None) -> bool:
|
|
63
|
+
if isinstance(response_or_exception, requests.Response) and response_or_exception.status_code == requests.codes.GONE:
|
|
64
|
+
try:
|
|
65
|
+
message = (response_or_exception.json().get("message") or "").lower()
|
|
66
|
+
except ValueError:
|
|
67
|
+
return False
|
|
68
|
+
return "are disabled" in message or "is disabled" in message
|
|
69
|
+
return False
|
|
70
|
+
|
|
71
|
+
|
|
58
72
|
class GithubStreamABCErrorHandler(HttpStatusErrorHandler):
|
|
59
73
|
def __init__(self, stream: HttpStream, **kwargs): # type: ignore # noqa
|
|
60
74
|
self.stream = stream
|
|
@@ -115,6 +129,14 @@ class GithubStreamABCErrorHandler(HttpStatusErrorHandler):
|
|
|
115
129
|
error_message=log_message,
|
|
116
130
|
)
|
|
117
131
|
|
|
132
|
+
if is_gone_with_feature_disabled(response_or_exception=response_or_exception):
|
|
133
|
+
log_message = f"Skipping stream slice for '{response_or_exception.url}': {response_or_exception.json().get('message', 'Feature disabled')}."
|
|
134
|
+
return ErrorResolution(
|
|
135
|
+
response_action=ResponseAction.IGNORE,
|
|
136
|
+
failure_type=FailureType.config_error,
|
|
137
|
+
error_message=log_message,
|
|
138
|
+
)
|
|
139
|
+
|
|
118
140
|
return super().interpret_response(response_or_exception)
|
|
119
141
|
|
|
120
142
|
|
|
@@ -34,6 +34,7 @@ from .errors_handlers import (
|
|
|
34
34
|
GitHubGraphQLErrorHandler,
|
|
35
35
|
GithubStreamABCErrorHandler,
|
|
36
36
|
is_conflict_with_empty_repository,
|
|
37
|
+
is_gone_with_feature_disabled,
|
|
37
38
|
)
|
|
38
39
|
from .graphql import (
|
|
39
40
|
CursorStorage,
|
|
@@ -187,13 +188,7 @@ class GithubStreamABC(HttpStream, ABC):
|
|
|
187
188
|
f"Your Personal Access Token may need to be renewed. GitHub message: {api_message!r}"
|
|
188
189
|
)
|
|
189
190
|
raise e
|
|
190
|
-
|
|
191
|
-
# Some repos don't have projects enabled and we get "410 Client Error: Gone for
|
|
192
|
-
# url: https://api.github.com/repos/xyz/projects?per_page=100" error.
|
|
193
|
-
error_msg = (
|
|
194
|
-
f"GitHub Projects (classic) is disabled for repository `{stream_slice['repository']}`. "
|
|
195
|
-
f"Skipping the `Projects` stream for this repository."
|
|
196
|
-
)
|
|
191
|
+
|
|
197
192
|
elif e._exception.response.status_code == requests.codes.CONFLICT:
|
|
198
193
|
error_msg = (
|
|
199
194
|
f"Skipping `{self.name}` for repository `{stream_slice['repository']}`: "
|
|
@@ -263,9 +258,8 @@ class GithubStream(GithubStreamABC):
|
|
|
263
258
|
stream_slice: Mapping[str, Any] = None,
|
|
264
259
|
next_page_token: Mapping[str, Any] = None,
|
|
265
260
|
) -> Iterable[Mapping]:
|
|
266
|
-
if is_conflict_with_empty_repository(response):
|
|
267
|
-
#
|
|
268
|
-
# ignored this error but continue to processing records. This may be fixed in latest CDK versions.
|
|
261
|
+
if is_conflict_with_empty_repository(response) or is_gone_with_feature_disabled(response):
|
|
262
|
+
# The CDK IGNORE action still calls parse_response; guard against non-array error bodies.
|
|
269
263
|
return
|
|
270
264
|
yield from super().parse_response(
|
|
271
265
|
response=response,
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/backoff_strategies.py
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/config_migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/github_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/assignees.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/branches.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/comments.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/commits.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/deployments.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/events.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/issues.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/projects.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/projects_v2.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/releases.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/reviews.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/shared/user.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/stargazers.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/tags.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/teams.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/users.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.25 → airbyte_source_github-2.1.26}/source_github/schemas/workflows.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|