1
0
mirror of synced 2025-12-23 21:03:15 -05:00

Source Github: Retry connection using HTTPAdapter (#8518)

* retry connection with Github using HTTPAdapter

* updated the connector version

* updated source def and spec yaml

Co-authored-by: Auganbay <auganenu@gmail.com>
This commit is contained in:
augan-rymkhan
2021-12-08 12:40:16 +06:00
committed by GitHub
parent 58475ce2a4
commit 10f1b58d66
5 changed files with 9 additions and 3 deletions

View File

@@ -211,7 +211,7 @@
- name: GitHub
sourceDefinitionId: ef69ef6e-aa7f-4af1-a01d-ef775033524e
dockerRepository: airbyte/source-github
dockerImageTag: 0.2.6
dockerImageTag: 0.2.7
documentationUrl: https://docs.airbyte.io/integrations/sources/github
icon: github.svg
sourceType: api

View File

@@ -1746,7 +1746,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-github:0.2.6"
- dockerImage: "airbyte/source-github:0.2.7"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/github"
connectionSpecification:

View File

@@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
LABEL io.airbyte.version=0.2.6
LABEL io.airbyte.version=0.2.7
LABEL io.airbyte.name=airbyte/source-github

View File

@@ -57,6 +57,11 @@ class GithubStream(HttpStream, ABC):
super().__init__(**kwargs)
self.repositories = repositories
MAX_RETRIES = 3
adapter = requests.adapters.HTTPAdapter(max_retries=MAX_RETRIES)
self._session.mount("https://", adapter)
self._session.mount("http://", adapter)
def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
return f"repos/{stream_slice['repository']}/{self.name}"

View File

@@ -92,6 +92,7 @@ Your token should have at least the `repo` scope. Depending on which streams you
| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.2.7 | 2021-12-06 | [8518](https://github.com/airbytehq/airbyte/pull/8518) | Add connection retry with Github |
| 0.2.6 | 2021-11-24 | [8030](https://github.com/airbytehq/airbyte/pull/8030) | Support start date property for PullRequestStats and Reviews streams |
| 0.2.5 | 2021-11-21 | [8170](https://github.com/airbytehq/airbyte/pull/8170) | Fix slow check connection for organizations with a lot of repos |
| 0.2.4 | 2021-11-11 | [7856](https://github.com/airbytehq/airbyte/pull/7856) | Resolve $ref fields in some stream schemas |