Skip to content

Commit ebb9beb

Browse files
🐛 Source Zendesk Support: Ticket Audits: added stop condition for fetching next pages, ignore 403 and 404 status codes. (#37761)
1 parent b60bbc7 commit ebb9beb

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

airbyte-integrations/connectors/source-zendesk-support/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data:
1111
connectorSubtype: api
1212
connectorType: source
1313
definitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
14-
dockerImageTag: 2.6.1
14+
dockerImageTag: 2.6.2
1515
dockerRepository: airbyte/source-zendesk-support
1616
documentationUrl: https://docs.airbyte.com/integrations/sources/zendesk-support
1717
githubIssueLabel: source-zendesk-support

airbyte-integrations/connectors/source-zendesk-support/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "2.6.1"
6+
version = "2.6.2"
77
name = "source-zendesk-support"
88
description = "Source implementation for Zendesk Support."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/components.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import requests
77
from airbyte_cdk.sources.declarative.extractors.record_extractor import RecordExtractor
88
from airbyte_cdk.sources.declarative.incremental import DatetimeBasedCursor
9-
from airbyte_cdk.sources.declarative.migrations.state_migration import StateMigration
109
from airbyte_cdk.sources.declarative.requesters.request_option import RequestOptionType
1110
from airbyte_cdk.sources.declarative.types import StreamSlice, StreamState
1211

airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/manifest.yaml

+19-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ definitions:
3838
- type: DefaultErrorHandler
3939
response_filters:
4040
- http_codes: [403, 404]
41-
action: FAIL
41+
action: IGNORE
4242
error_message: "Skipping stream {{ parameters.get('name') }}, error message: {{ response.get('error') }}. Please ensure the authenticated user has access to this stream. If the issue persists, contact Zendesk support."
4343
- type: DefaultErrorHandler
4444
backoff_strategies:
@@ -406,7 +406,7 @@ definitions:
406406
action: FAIL
407407
error_message: "Skipping stream `{{ parameters.get('name') }}`. Timed out waiting for response: {{ response.text }}..."
408408
- http_codes: [403, 404]
409-
action: FAIL
409+
action: IGNORE
410410
error_message: "Skipping stream {{ parameters.get('name') }}, error message: {{ response.get('error') }}. Please ensure the authenticated user has access to this stream. If the issue persists, contact Zendesk support."
411411
paginator:
412412
type: DefaultPaginator
@@ -418,7 +418,7 @@ definitions:
418418
type: CursorPagination
419419
page_size: 200
420420
cursor_value: "{{ response.get('before_url') }}"
421-
stop_condition: "{{ config.get('ignore_pagination') or 'before_url' not in response }}"
421+
stop_condition: "{{ config.get('ignore_pagination') or 'before_url' not in response or not last_record }}"
422422
page_token_option:
423423
type: RequestPath
424424
incremental_sync:
@@ -456,7 +456,7 @@ definitions:
456456
type: RequestPath
457457
$parameters:
458458
name: "ticket_comments"
459-
path: "incremental/ticket_events.jsopn"
459+
path: "incremental/ticket_events.json"
460460
cursor_field: "created_at"
461461
cursor_filter: "start_time"
462462
primary_key: "id"
@@ -476,7 +476,21 @@ definitions:
476476
ticket_forms_stream:
477477
$ref: "#/definitions/semi_incremental_stream"
478478
retriever:
479-
$ref: "#/definitions/semi_incremental_stream/retriever"
479+
$ref: "#/definitions/retriever"
480+
requester:
481+
$ref: "#/definitions/retriever/requester"
482+
error_handler:
483+
type: CompositeErrorHandler
484+
error_handlers:
485+
- type: DefaultErrorHandler
486+
response_filters:
487+
- http_codes: [403, 404]
488+
action: FAIL # fail as this stream used to define enterprise plan
489+
error_message: "Skipping stream {{ parameters.get('name') }}, error message: {{ response.get('error') }}. Please ensure the authenticated user has access to this stream. If the issue persists, contact Zendesk support."
490+
- type: DefaultErrorHandler
491+
backoff_strategies:
492+
- type: WaitTimeFromHeader
493+
header: Retry-After
480494
paginator:
481495
type: DefaultPaginator
482496
pagination_strategy:

docs/integrations/sources/zendesk-support.md

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ The Zendesk connector ideally should not run into Zendesk API limitations under
158158

159159
| Version | Date | Pull Request | Subject |
160160
|:---------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
161+
| `2.6.2` | 2024-02-05 | [37761](https://github.com/airbytehq/airbyte/pull/37761) | Add stop condition for `Ticket Audits` when recieved old records; Ignore 403 and 404 status codes. |
161162
| `2.6.1` | 2024-04-30 | [37723](https://github.com/airbytehq/airbyte/pull/37723) | Add %Y-%m-%dT%H:%M:%S%z to cursor_datetime_formats |
162163
| `2.6.0` | 2024-04-29 | [36823](https://github.com/airbytehq/airbyte/pull/36823) | Migrate to low code; Add new stream `Ticket Activities` |
163164
| `2.5.0` | 2024-04-25 | [36388](https://github.com/airbytehq/airbyte/pull/36388) | Fix data type of field in `Tickets` stream schema stream. |

0 commit comments

Comments
 (0)