Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Source Zendesk Support: fix incremental logic for ticket_comments stream #5787

Merged
merged 16 commits into from
Sep 9, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "79c1aa37-dae3-42ae-b333-d1c105477715",
"name": "Zendesk Support",
"dockerRepository": "airbyte/source-zendesk-support",
"dockerImageTag": "0.1.0",
"dockerImageTag": "0.1.1",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/zendesk-support",
"icon": "zendesk.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
- sourceDefinitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
name: Zendesk Support
dockerRepository: airbyte/source-zendesk-support
dockerImageTag: 0.1.0
dockerImageTag: 0.1.1
documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-support
icon: zendesk.svg
- sourceDefinitionId: d8313939-3782-41b0-be29-b3ca20d8dd3a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,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.1.0
LABEL io.airbyte.version=0.1.1
LABEL io.airbyte.name=airbyte/source-zendesk-support
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env sh
image_name=$(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2-)
# Build latest connector image
echo "try to build: ${image_name}"
docker build . -t ${image_name}

# Pull latest acctest image
docker pull airbyte/source-acceptance-test:latest

docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def _test_export_stream(self, stream_cls: type):
for record_id, timestamp in record_timestamps.items():
state = {stream.cursor_field: timestamp}
for record in stream.read_records(sync_mode=None, stream_state=state):
print(f"First record: {record}!={record_id} ({timestamp}), state:{state}")
assert record["id"] != record_id
break

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"email": "broken.email@invalid.config",
"api_token": "<broken token>",
"auth_method": {
"api_token": "<broken token>",
"email": "broken.email@invalid.config"
},
"subdomain": "test-failure-airbyte",
"start_date": "2030-01-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

MAIN_REQUIREMENTS = ["airbyte-cdk", "pytz"]

TEST_REQUIREMENTS = ["pytest~=6.1", "source-acceptance-test", "requests-mock==1.9.3", "timeout-decorator==0.5.0"]
TEST_REQUIREMENTS = ["pytest~=6.1", "source-acceptance-test", "requests-mock==1.9.3"]

setup(
version="0.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"type": ["null", "integer"]
},
"deleted_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@
"type": ["null", "integer"]
},
"latest_comment_added_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
},
"on_hold_time_in_minutes": {
"type": ["null", "object"],
Expand Down Expand Up @@ -131,20 +130,16 @@
"type": ["null", "string"]
},
"initially_assigned_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
antixar marked this conversation as resolved.
Show resolved Hide resolved
},
"assigned_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
},
"solved_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
},
"assignee_updated_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
}
},
"type": ["null", "object"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@
"type": ["null", "boolean"]
},
"due_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
},
"followup_ids": {
"items": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@
"additionalProperties": true
},
"last_login_at": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
antixar marked this conversation as resolved.
Show resolved Hide resolved
},
"alias": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"auth_method": {
"title": "ZenDesk Authorization Method",
"type": "object",
"default": "api_token",
"description": "Zendesk service provides 2 auth method: API token and oAuth2. Now only the first one is available. Another one will be added in the future",
"oneOf": [
{
Expand All @@ -28,6 +29,10 @@
"required": ["email", "api_token"],
"additionalProperties": false,
"properties": {
"auth_method": {
"type": "string",
"const": "api_token"
},
"email": {
"type": "string",
"description": "The user email for your Zendesk account"
Expand Down
Loading