Skip to content

Commit

Permalink
Source Zendesk Support: handle 400 error for tickets stream (#23246)
Browse files Browse the repository at this point in the history
* Source Zendesk Support: increase recent start time for ticket stream

* Source Zendesk Support: added more comments

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
roman-yermilov-gl and octavia-squidington-iii committed Feb 27, 2023
1 parent 648634c commit 3b7bbb7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@
- name: Zendesk Support
sourceDefinitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
dockerRepository: airbyte/source-zendesk-support
dockerImageTag: 0.2.23
dockerImageTag: 0.2.24
documentationUrl: https://docs.airbyte.com/integrations/sources/zendesk-support
icon: zendesk-support.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16508,7 +16508,7 @@
path_in_connector_config:
- "credentials"
- "client_secret"
- dockerImage: "airbyte/source-zendesk-support:0.2.23"
- dockerImage: "airbyte/source-zendesk-support:0.2.24"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/zendesk-support"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ COPY source_zendesk_support ./source_zendesk_support
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.23
LABEL io.airbyte.version=0.2.24
LABEL io.airbyte.name=airbyte/source-zendesk-support
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ acceptance_tests:
- config_path: "secrets/config.json"
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
incremental:
tests:
- config_path: "secrets/config.json"
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,14 @@ class Tickets(SourceZendeskIncrementalExportStream):
response_list_name: str = "tickets"
transformer: TypeTransformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)

@staticmethod
def check_start_time_param(requested_start_time: int, value: int = 1):
"""
The stream returns 400 Bad Request StartTimeTooRecent when requesting tasks 1 second before now.
Figured out during experiments that the most recent time needed for request to be successful is 3 seconds before now.
"""
return SourceZendeskIncrementalExportStream.check_start_time_param(requested_start_time, value=3)


class TicketComments(SourceZendeskSupportTicketEventsExportStream):
"""
Expand Down
2 changes: 1 addition & 1 deletion connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
| **Zendesk Chat** | <img alt="Zendesk Chat icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk-chat.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-chat:0.1.12 | generally_available | [link](https://docs.airbyte.com/integrations/sources/zendesk-chat) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-chat) | <small>`40d24d0f-b8f9-4fe0-9e6c-b06c0f3f45e4`</small> |
| **Zendesk Sell** | <img alt="Zendesk Sell icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-sell:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/zendesk-sell) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-sell) | <small>`982eaa4c-bba1-4cce-a971-06a41f700b8c`</small> |
| **Zendesk Sunshine** | <img alt="Zendesk Sunshine icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk-sunshine.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-sunshine:0.1.1 | alpha | [link](https://docs.airbyte.com/integrations/sources/zendesk-sunshine) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-sunshine) | <small>`325e0640-e7b3-4e24-b823-3361008f603f`</small> |
| **Zendesk Support** | <img alt="Zendesk Support icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk-support.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-support:0.2.23 | generally_available | [link](https://docs.airbyte.com/integrations/sources/zendesk-support) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-support) | <small>`79c1aa37-dae3-42ae-b333-d1c105477715`</small> |
| **Zendesk Support** | <img alt="Zendesk Support icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk-support.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-support:0.2.24 | generally_available | [link](https://docs.airbyte.com/integrations/sources/zendesk-support) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-support) | <small>`79c1aa37-dae3-42ae-b333-d1c105477715`</small> |
| **Zendesk Talk** | <img alt="Zendesk Talk icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zendesk-talk.svg" height="30" height="30"/> | Source | airbyte/source-zendesk-talk:0.1.6 | generally_available | [link](https://docs.airbyte.com/integrations/sources/zendesk-talk) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zendesk-talk) | <small>`c8630570-086d-4a40-99ae-ea5b18673071`</small> |
| **Zenefits** | <img alt="Zenefits icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zenefits.svg" height="30" height="30"/> | Source | airbyte/source-zenefits:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/zenefits) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zenefits) | <small>`8baba53d-2fe3-4e33-bc85-210d0eb62884`</small> |
| **Zenloop** | <img alt="Zenloop icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/zenloop.svg" height="30" height="30"/> | Source | airbyte/source-zenloop:0.1.5 | beta | [link](https://docs.airbyte.com/integrations/sources/zenloop) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-zenloop) | <small>`f1e4c7f6-db5c-4035-981f-d35ab4998794`</small> |
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/zendesk-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The Zendesk connector ideally should not run into Zendesk API limitations under

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `0.2.24` | 2023-02-17 | [23246](https://github.com/airbytehq/airbyte/pull/23246) | Handle `StartTimeTooRecent` error for Tickets stream |
| `0.2.23` | 2023-02-15 | [23035](https://github.com/airbytehq/airbyte/pull/23035) | Handle 403 Error |
| `0.2.22` | 2023-02-14 | [22483](https://github.com/airbytehq/airbyte/pull/22483) | Fix test; handle 400 error |
| `0.2.21` | 2023-01-27 | [22027](https://github.com/airbytehq/airbyte/pull/22027) | Set `AvailabilityStrategy` for streams explicitly to `None` |
Expand Down

0 comments on commit 3b7bbb7

Please sign in to comment.