Skip to content

Commit

Permalink
Revert "Source Zendesk Support: fix tests (#22483)"
Browse files Browse the repository at this point in the history
This reverts commit eaf7ec0.
  • Loading branch information
cgardens committed Feb 14, 2023
1 parent 62eabcb commit ee2ad5d
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2045,9 +2045,6 @@
icon: zendesk-support.svg
sourceType: api
releaseStage: generally_available
allowedHosts:
hosts:
- "${subdomain}.zendesk.com"
- name: Zendesk Talk
sourceDefinitionId: c8630570-086d-4a40-99ae-ea5b18673071
dockerRepository: airbyte/source-zendesk-talk
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.22
LABEL io.airbyte.version=0.2.21
LABEL io.airbyte.name=airbyte/source-zendesk-support
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "custom_roles",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "brands",
"json_schema": {},
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["updated_at"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "append"
},
{
"stream": {
"name": "macros",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from concurrent.futures import Future, ProcessPoolExecutor
from datetime import datetime, timedelta
from functools import partial

from airbyte_cdk.sources.streams.core import StreamData
from math import ceil
from pickle import PickleError, dumps
from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Union
Expand All @@ -29,7 +27,6 @@
from airbyte_cdk.sources.streams.http.exceptions import DefaultBackoffException
from airbyte_cdk.sources.streams.http.rate_limiting import TRANSIENT_EXCEPTIONS
from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer
from requests import HTTPError
from requests.auth import AuthBase
from requests_futures.sessions import PICKLE_ERROR, FuturesSession

Expand Down Expand Up @@ -538,20 +535,6 @@ class Tickets(SourceZendeskIncrementalExportStream):
response_list_name: str = "tickets"
transformer: TypeTransformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)

def read_records(
self,
sync_mode: SyncMode,
cursor_field: List[str] = None,
stream_slice: Mapping[str, Any] = None,
stream_state: Mapping[str, Any] = None,
) -> Iterable[StreamData]:
try:
yield from super(Tickets, self).read_records(sync_mode, cursor_field, stream_slice, stream_state)
except HTTPError as e:
if e.response.status_code == 400 and e.response.json().get('error', '') == 'StartTimeTooRecent':
return []
raise e


class TicketComments(SourceZendeskSupportTicketEventsExportStream):
"""
Expand Down
1 change: 0 additions & 1 deletion docs/integrations/sources/zendesk-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ The Zendesk connector ideally should not run into Zendesk API limitations under

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `0.2.22` | 2023-02-07 | [22483](https://github.com/airbytehq/airbyte/pull/22483) | Update expected records, fix `Tickets` to properly handle abnormal state |
| `0.2.21` | 2023-01-27 | [22027](https://github.com/airbytehq/airbyte/pull/22027) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| `0.2.20` | 2022-12-28 | [20900](https://github.com/airbytehq/airbyte/pull/20900) | Remove synchronous time.sleep, add logging, reduce backoff time |
| `0.2.19` | 2022-12-09 | [19967](https://github.com/airbytehq/airbyte/pull/19967) | Fix reading response for more than 100k records |
Expand Down

0 comments on commit ee2ad5d

Please sign in to comment.