From 19b53750908e11b5f15726759178859f8318c5a7 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants <36314070+artem1205@users.noreply.github.com> Date: Fri, 13 Jan 2023 18:32:27 +0100 Subject: [PATCH] Source Slack: retry timeout error (#21321) * Source Slack: retry timeout error * Source Slack: update docs * Source Slack: update retry * auto-bump connector version Co-authored-by: Octavia Squidington III --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- airbyte-config/init/src/main/resources/seed/source_specs.yaml | 2 +- airbyte-integrations/connectors/source-slack/Dockerfile | 2 +- .../connectors/source-slack/source_slack/source.py | 3 +++ docs/integrations/sources/slack.md | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index dd35f06a16a9..22e6fab492a5 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1582,7 +1582,7 @@ - name: Slack sourceDefinitionId: c2281cee-86f9-4a86-bb48-d23286b4c7bd dockerRepository: airbyte/source-slack - dockerImageTag: 0.1.20 + dockerImageTag: 0.1.21 documentationUrl: https://docs.airbyte.com/integrations/sources/slack icon: slack.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 21a3f3d4d690..6fef1da5a6ca 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -13400,7 +13400,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-slack:0.1.20" +- dockerImage: "airbyte/source-slack:0.1.21" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/slack" connectionSpecification: diff --git a/airbyte-integrations/connectors/source-slack/Dockerfile b/airbyte-integrations/connectors/source-slack/Dockerfile index a0ff6a254396..ac5ad0c8a508 100644 --- a/airbyte-integrations/connectors/source-slack/Dockerfile +++ b/airbyte-integrations/connectors/source-slack/Dockerfile @@ -17,5 +17,5 @@ COPY main.py ./ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.20 +LABEL io.airbyte.version=0.1.21 LABEL io.airbyte.name=airbyte/source-slack diff --git a/airbyte-integrations/connectors/source-slack/source_slack/source.py b/airbyte-integrations/connectors/source-slack/source_slack/source.py index 63288a1f2add..214db26f2717 100644 --- a/airbyte-integrations/connectors/source-slack/source_slack/source.py +++ b/airbyte-integrations/connectors/source-slack/source_slack/source.py @@ -76,6 +76,9 @@ def backoff_time(self, response: requests.Response) -> Optional[float]: def data_field(self) -> str: """The name of the field in the response which contains the data""" + def should_retry(self, response: requests.Response) -> bool: + return response.status_code == requests.codes.REQUEST_TIMEOUT or super().should_retry(response) + class ChanneledStream(SlackStream, ABC): """Slack stream with channel filter""" diff --git a/docs/integrations/sources/slack.md b/docs/integrations/sources/slack.md index ccf5b07af39d..9741d94178c6 100644 --- a/docs/integrations/sources/slack.md +++ b/docs/integrations/sources/slack.md @@ -136,6 +136,7 @@ It is recommended to sync required channels only, this can be done by specifying | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------| +| 0.1.21 | 2023-01-12 | [21321](https://github.com/airbytehq/airbyte/pull/21321) | Retry Timeout error | | 0.1.20 | 2022-12-21 | [20767](https://github.com/airbytehq/airbyte/pull/20767) | Update schema | | 0.1.19 | 2022-12-01 | [19970](https://github.com/airbytehq/airbyte/pull/19970) | Remove OAuth2.0 broken `refresh_token` support | | 0.1.18 | 2022-09-28 | [17315](https://github.com/airbytehq/airbyte/pull/17315) | Always install latest version of Airbyte CDK |