airbyte-source-github 2.1.27__tar.gz → 2.1.28__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.27 → airbyte_source_github-2.1.28}/PKG-INFO +1 -1
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/pyproject.toml +1 -1
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/errors_handlers.py +20 -3
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/streams.py +22 -2
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/README.md +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/__init__.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/backoff_strategies.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/config_migrations.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/constants.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/github_schema.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/graphql.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/run.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/assignees.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/branches.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/collaborators.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/commit_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/commit_comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/commits.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/contributor_activity.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/deployments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_labels.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_milestones.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issue_timeline_events.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/issues.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/organizations.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/project_cards.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/project_columns.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/projects.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/projects_v2.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/pull_request_comment_reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/pull_request_commits.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/pull_request_stats.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/pull_requests.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/releases.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/repositories.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/review_comments.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/reviews.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/events/comment.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/events/commented.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/events/committed.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/events/cross_referenced.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/events/reviewed.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/reaction.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/reactions.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/user.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/user_graphql.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/stargazers.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/tags.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/team_members.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/team_memberships.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/teams.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/users.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/workflow_jobs.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/workflow_runs.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/workflows.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/source.py +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/spec.json +0 -0
- {airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/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.28"
|
|
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.27 → airbyte_source_github-2.1.28}/source_github/errors_handlers.py
RENAMED
|
@@ -199,11 +199,25 @@ class GitHubGraphQLErrorHandler(GithubStreamABCErrorHandler):
|
|
|
199
199
|
def interpret_response(self, response_or_exception: Optional[Union[requests.Response, Exception]] = None) -> ErrorResolution:
|
|
200
200
|
if isinstance(response_or_exception, requests.Response):
|
|
201
201
|
if response_or_exception.status_code in (requests.codes.BAD_GATEWAY, requests.codes.GATEWAY_TIMEOUT):
|
|
202
|
-
|
|
202
|
+
# Halve the page size on every 502/504 to reduce GraphQL query cost,
|
|
203
|
+
# but never let it drop below 1 — a page_size of 0 would request no
|
|
204
|
+
# records and cause infinite paging.
|
|
205
|
+
previous_page_size = self.stream.page_size
|
|
206
|
+
self.stream.page_size = max(1, int(self.stream.page_size / 2))
|
|
207
|
+
self._logger.info(
|
|
208
|
+
"GitHub GraphQL endpoint returned HTTP %s for stream `%s`; reducing GraphQL page_size from %s to %s and retrying.",
|
|
209
|
+
response_or_exception.status_code,
|
|
210
|
+
self.stream.name,
|
|
211
|
+
previous_page_size,
|
|
212
|
+
self.stream.page_size,
|
|
213
|
+
)
|
|
203
214
|
return ErrorResolution(
|
|
204
215
|
response_action=ResponseAction.RETRY,
|
|
205
216
|
failure_type=FailureType.transient_error,
|
|
206
|
-
error_message=
|
|
217
|
+
error_message=(
|
|
218
|
+
f"GitHub GraphQL endpoint returned HTTP {response_or_exception.status_code} "
|
|
219
|
+
f"for stream `{self.stream.name}`. Reducing GraphQL page size and retrying."
|
|
220
|
+
),
|
|
207
221
|
)
|
|
208
222
|
|
|
209
223
|
self.stream.page_size = (
|
|
@@ -214,7 +228,10 @@ class GitHubGraphQLErrorHandler(GithubStreamABCErrorHandler):
|
|
|
214
228
|
return ErrorResolution(
|
|
215
229
|
response_action=ResponseAction.RETRY,
|
|
216
230
|
failure_type=FailureType.transient_error,
|
|
217
|
-
error_message=
|
|
231
|
+
error_message=(
|
|
232
|
+
f"GitHub GraphQL endpoint returned errors in the response body "
|
|
233
|
+
f"for stream `{self.stream.name}` (HTTP {response_or_exception.status_code}). Retrying."
|
|
234
|
+
),
|
|
218
235
|
)
|
|
219
236
|
|
|
220
237
|
return super().interpret_response(response_or_exception)
|
|
@@ -201,6 +201,12 @@ class GithubStreamABC(HttpStream, ABC):
|
|
|
201
201
|
f"GitHub returned HTTP 502 Bad Gateway for stream `{self.name}` after exhausting retries. "
|
|
202
202
|
f"This is usually transient — the next sync attempt should succeed."
|
|
203
203
|
)
|
|
204
|
+
elif e._exception.response.status_code == requests.codes.GATEWAY_TIMEOUT:
|
|
205
|
+
error_msg = (
|
|
206
|
+
f"GitHub returned HTTP 504 Gateway Timeout for stream `{self.name}` after exhausting retries "
|
|
207
|
+
f"and reducing the GraphQL page size. The next sync attempt should succeed; "
|
|
208
|
+
f'if 504s persist, lower "Page size for large streams" in the source configuration.'
|
|
209
|
+
)
|
|
204
210
|
else:
|
|
205
211
|
self.logger.error(f"Undefined error while reading records: {e._exception.response.text}")
|
|
206
212
|
raise e
|
|
@@ -232,11 +238,15 @@ class GithubStream(GithubStreamABC):
|
|
|
232
238
|
def get_error_display_message(self, exception: BaseException) -> Optional[str]:
|
|
233
239
|
if (
|
|
234
240
|
isinstance(exception, DefaultBackoffException)
|
|
235
|
-
and exception.response.status_code
|
|
241
|
+
and exception.response.status_code in (requests.codes.BAD_GATEWAY, requests.codes.GATEWAY_TIMEOUT)
|
|
236
242
|
and self.large_stream
|
|
237
243
|
and self.page_size > 1
|
|
238
244
|
):
|
|
239
|
-
return
|
|
245
|
+
return (
|
|
246
|
+
f'Please try to decrease the "Page size for large streams" below {self.page_size}. '
|
|
247
|
+
f'The stream "{self.name}" is a large stream, such streams can fail with '
|
|
248
|
+
f'{exception.response.status_code} for high "page_size" values.'
|
|
249
|
+
)
|
|
240
250
|
return super().get_error_display_message(exception)
|
|
241
251
|
|
|
242
252
|
def transform(self, record: MutableMapping[str, Any], stream_slice: Mapping[str, Any]) -> MutableMapping[str, Any]:
|
|
@@ -850,6 +860,16 @@ class Releases(SemiIncrementalMixin, GitHubGraphQLStream):
|
|
|
850
860
|
|
|
851
861
|
cursor_field = "created_at"
|
|
852
862
|
is_sorted = "asc"
|
|
863
|
+
# The Releases GraphQL query is high-cost on the server side: every node
|
|
864
|
+
# materializes `description` and `descriptionHTML`, which forces GitHub
|
|
865
|
+
# to render each release body to HTML. On repositories with long release
|
|
866
|
+
# notes, a page_size of 100 pushes the resolver past its internal 10s
|
|
867
|
+
# deadline and returns 504 Gateway Timeout (reproduced deterministically
|
|
868
|
+
# against nodejs/node: first=100 -> 504 in ~11s; first=10 -> 200 in ~3s).
|
|
869
|
+
# `releaseAssets` / `reactionGroups` / `mentions` are NOT the cost driver
|
|
870
|
+
# — stripping them does not fix the timeout, only lowering `first` does.
|
|
871
|
+
# Mark as large_stream so it picks up the smaller default page size.
|
|
872
|
+
large_stream = True
|
|
853
873
|
|
|
854
874
|
GRAPHQL_REACTION_TO_REST = {
|
|
855
875
|
"THUMBS_UP": "plus_one",
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/backoff_strategies.py
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/config_migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/github_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/assignees.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/branches.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/comments.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/commits.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/deployments.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/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.27 → airbyte_source_github-2.1.28}/source_github/schemas/issues.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/projects.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/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.27 → airbyte_source_github-2.1.28}/source_github/schemas/releases.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/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.27 → airbyte_source_github-2.1.28}/source_github/schemas/shared/user.json
RENAMED
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/stargazers.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/tags.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/teams.json
RENAMED
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/users.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_source_github-2.1.27 → airbyte_source_github-2.1.28}/source_github/schemas/workflows.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|