Skip to content

Commit

Permalink
fix(source-zendesk-support): Stream Tags: use cursor based pagination (
Browse files Browse the repository at this point in the history
…#44096)

Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
  • Loading branch information
artem1205 authored Aug 20, 2024
1 parent 8b6a91a commit 9eccb24
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{"stream": "satisfaction_ratings", "data": {"url": "https://d3v-airbyte.zendesk.com/api/v2/satisfaction_ratings/7235633102607.json", "id": 7235633102607, "assignee_id": null, "group_id": null, "requester_id": 361089721035, "ticket_id": 146, "score": "offered", "created_at": "2023-06-19T18:01:40Z", "updated_at": "2023-06-19T18:01:40Z", "comment": null}, "emitted_at": 1720179592962}
{"stream": "satisfaction_ratings", "data": {"url": "https://d3v-airbyte.zendesk.com/api/v2/satisfaction_ratings/8178725484175.json", "id": 8178725484175, "assignee_id": null, "group_id": null, "requester_id": 8178212241935, "ticket_id": 158, "score": "offered", "created_at": "2023-10-20T12:01:58Z", "updated_at": "2023-10-20T12:01:58Z", "comment": null}, "emitted_at": 1720179592971}
{"stream": "satisfaction_ratings", "data": {"url": "https://d3v-airbyte.zendesk.com/api/v2/satisfaction_ratings/9862120719631.json", "id": 9862120719631, "assignee_id": null, "group_id": null, "requester_id": 9861847678735, "ticket_id": 161, "score": "offered", "created_at": "2024-05-28T21:01:33Z", "updated_at": "2024-05-28T21:01:33Z", "comment": null}, "emitted_at": 1720179592979}
{"stream": "ticket_activities", "data": {"url":"https://d3v-airbyte.zendesk.com/api/v2/activities/10241717754895.json","id":10241717754895,"title":"Danylo commented on ticket #160: \n\nI hope so!.","verb":"tickets.comment","user_id":360786799676,"actor_id":9515132940047,"updated_at":"2024-07-18T12:40:07Z","created_at":"2024-07-18T12:40:07Z","object":{"comment":{"value":"\n\nI hope so!","public":true}},"target":{"ticket":{"id":160,"subject":"Stream filling request"}},"user":{"id":360786799676,"url":"https://d3v-airbyte.zendesk.com/api/v2/users/360786799676.json","name":"Team Airbyte","email":"integration-test@airbyte.io","created_at":"2020-11-17T23:55:24Z","updated_at":"2024-07-23T15:58:52Z","time_zone":"Pacific/Noumea","iana_time_zone":"Pacific/Noumea","phone":null,"shared_phone_number":null,"photo":{"url":"https://d3v-airbyte.zendesk.com/api/v2/attachments/7282857066895.json","id":7282857066895,"file_name":"Airbyte_logo_220x220.png","content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220.png","mapped_content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220.png","content_type":"image/png","size":5442,"width":80,"height":80,"inline":false,"deleted":false,"thumbnails":[{"url":"https://d3v-airbyte.zendesk.com/api/v2/attachments/7282824912911.json","id":7282824912911,"file_name":"Airbyte_logo_220x220_thumb.png","content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220_thumb.png","mapped_content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220_thumb.png","content_type":"image/png","size":1422,"width":32,"height":32,"inline":false,"deleted":false}]},"locale_id":1,"locale":"en-US","organization_id":360033549136,"role":"admin","verified":true,"external_id":null,"tags":[],"alias":"Team Airbyte","active":true,"shared":false,"shared_agent":false,"last_login_at":"2024-07-23T15:58:40Z","two_factor_auth_enabled":null,"signature":null,"details":null,"notes":null,"role_type":4,"custom_role_id":360006308896,"moderator":true,"ticket_restriction":null,"only_private_comments":false,"restricted_agent":false,"suspended":false,"default_group_id":360003074836,"report_csv":true,"user_fields":{"test_display_name_checkbox_field":false,"test_display_name_decimal_field":null,"test_display_name_text_field":null}},"actor":{"id":9515132940047,"url":"https://d3v-airbyte.zendesk.com/api/v2/users/9515132940047.json","name":"Danylo","email":"gl_danylo.jablonski@airbyte.io","created_at":"2024-04-12T13:38:07Z","updated_at":"2024-04-12T13:38:07Z","time_zone":"Pacific/Noumea","iana_time_zone":"Pacific/Noumea","phone":null,"shared_phone_number":null,"photo":null,"locale_id":1,"locale":"en-US","organization_id":null,"role":"end-user","verified":false,"external_id":null,"tags":[],"alias":"","active":true,"shared":false,"shared_agent":false,"last_login_at":null,"two_factor_auth_enabled":null,"signature":null,"details":"","notes":"","role_type":null,"custom_role_id":null,"moderator":false,"ticket_restriction":"requested","only_private_comments":false,"restricted_agent":true,"suspended":false,"default_group_id":null,"report_csv":false,"user_fields":{"test_display_name_checkbox_field":false,"test_display_name_decimal_field":null,"test_display_name_text_field":null}}},"emitted_at":1721753977938}
{"stream":"ticket_activities","data":{"url":"https://d3v-airbyte.zendesk.com/api/v2/activities/10493997262351.json","id":10493997262351,"title":"Danylo commented on ticket #160: I hope so!.","verb":"tickets.comment","user_id":360786799676,"actor_id":9515132940047,"updated_at":"2024-08-19T16:19:27Z","created_at":"2024-08-19T16:19:27Z","object":{"comment":{"value":"I hope so!","public":true}},"target":{"ticket":{"id":160,"subject":"Stream filling request"}},"user":{"id":360786799676,"url":"https://d3v-airbyte.zendesk.com/api/v2/users/360786799676.json","name":"Team Airbyte","email":"integration-test@airbyte.io","created_at":"2020-11-17T23:55:24Z","updated_at":"2024-08-19T16:10:05Z","time_zone":"Pacific/Noumea","iana_time_zone":"Pacific/Noumea","phone":null,"shared_phone_number":null,"photo":{"url":"https://d3v-airbyte.zendesk.com/api/v2/attachments/7282857066895.json","id":7282857066895,"file_name":"Airbyte_logo_220x220.png","content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220.png","mapped_content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220.png","content_type":"image/png","size":5442,"width":80,"height":80,"inline":false,"deleted":false,"thumbnails":[{"url":"https://d3v-airbyte.zendesk.com/api/v2/attachments/7282824912911.json","id":7282824912911,"file_name":"Airbyte_logo_220x220_thumb.png","content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220_thumb.png","mapped_content_url":"https://d3v-airbyte.zendesk.com/system/photos/7282857066895/Airbyte_logo_220x220_thumb.png","content_type":"image/png","size":1422,"width":32,"height":32,"inline":false,"deleted":false}]},"locale_id":1,"locale":"en-US","organization_id":360033549136,"role":"admin","verified":true,"external_id":null,"tags":[],"alias":"Team Airbyte","active":true,"shared":false,"shared_agent":false,"last_login_at":"2024-08-19T16:09:53Z","two_factor_auth_enabled":null,"signature":null,"details":null,"notes":null,"role_type":4,"custom_role_id":360006308896,"moderator":true,"ticket_restriction":null,"only_private_comments":false,"restricted_agent":false,"suspended":false,"default_group_id":360003074836,"report_csv":true,"user_fields":{"test_display_name_checkbox_field":false,"test_display_name_decimal_field":null,"test_display_name_text_field":null}},"actor":{"id":9515132940047,"url":"https://d3v-airbyte.zendesk.com/api/v2/users/9515132940047.json","name":"Danylo","email":"gl_danylo.jablonski@airbyte.io","created_at":"2024-04-12T13:38:07Z","updated_at":"2024-04-12T13:38:07Z","time_zone":"Pacific/Noumea","iana_time_zone":"Pacific/Noumea","phone":null,"shared_phone_number":null,"photo":null,"locale_id":1,"locale":"en-US","organization_id":null,"role":"end-user","verified":false,"external_id":null,"tags":[],"alias":"","active":true,"shared":false,"shared_agent":false,"last_login_at":null,"two_factor_auth_enabled":null,"signature":null,"details":"","notes":"","role_type":null,"custom_role_id":null,"moderator":false,"ticket_restriction":"requested","only_private_comments":false,"restricted_agent":true,"suspended":false,"default_group_id":null,"report_csv":false,"user_fields":{"test_display_name_checkbox_field":false,"test_display_name_decimal_field":null,"test_display_name_text_field":null}}},"emitted_at":1724084379918}
{"stream": "ticket_audits", "data": {"id": 10021116193295, "ticket_id": 160, "created_at": "2024-06-19T09:49:54Z", "author_id": 9515132940047, "metadata": {"system": {"message_id": "<00a201dac22e$068cdcf0$13a696d0$@airbyte.io>", "client": "Microsoft Outlook 16.0", "email_id": "01J0QYE6SGCX3Z936BFETHRR8P", "ip_address": "024.06.19.02", "raw_email_identifier": "10414779/4fe5f3c6-857a-4560-a065-aae562a36b53.eml", "json_email_identifier": "10414779/4fe5f3c6-857a-4560-a065-aae562a36b53.json", "eml_redacted": false, "location": "Mountain View, CA, United States", "latitude": 37.3859, "longitude": -122.0882}, "custom": {}, "flags": [15], "flags_options": {"15": {"trusted": true}}, "trusted": true, "suspension_type_id": null}, "events": [{"id": 10021099820047, "type": "Comment", "author_id": 9515132940047, "body": "\n\n\n\nI hope so!", "html_body": "<div class=\"zd-comment zd-comment-pre-styled\" dir=\"auto\"><div style=\"page: WordSection1;\"><p style=\"font-size: 11.0pt; margin: 0in 0in .0001pt;\" dir=\"auto\">&nbsp;</p><p style=\"font-size: 11.0pt; margin: 0in 0in .0001pt;\" dir=\"auto\">&nbsp;</p><p style=\"font-size: 11.0pt; margin: 0in 0in .0001pt;\" dir=\"auto\">I hope so!</p><p style=\"font-size: 11.0pt; margin: 0in 0in .0001pt;\" dir=\"auto\">&nbsp;</p></div></div>", "plain_body": "&nbsp; &nbsp; I hope so! &nbsp;", "public": true, "attachments": [], "audit_id": 10021116193295}, {"id": 10021116193423, "type": "Notification", "via": {"channel": "rule", "source": {"from": {"deleted": false, "title": "Notify assignee of comment update", "id": 360011363236, "revision_id": 1}, "rel": "trigger"}}, "subject": "[{{ticket.account}}] Re: {{ticket.title}}", "body": "This ticket (#{{ticket.id}}) has been updated.\n\n{{ticket.comments_formatted}}", "recipients": [360786799676]}], "via": {"channel": "email", "source": {"from": {"address": "gl_danylo.jablonski@airbyte.io", "name": "Danylo", "original_recipients": ["gl_danylo.jablonski@airbyte.io", "support+id160@d3v-airbyte.zendesk.com"]}, "to": {"name": "Airbyte", "address": "support+id160@d3v-airbyte.zendesk.com"}, "rel": null}}}, "emitted_at": 1720179595459}
{"stream": "ticket_audits", "data": {"id": 10020996855439, "ticket_id": 160, "created_at": "2024-06-19T09:28:21Z", "author_id": 360786799676, "metadata": {"system": {"client": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", "ip_address": "45.89.90.157", "location": "Lviv, 46, Ukraine", "latitude": 49.839, "longitude": 24.0191}, "custom": {}}, "events": [{"id": 10020996855567, "type": "Change", "value": "high", "field_name": "priority", "previous_value": "normal"}], "via": {"channel": "web", "source": {"from": {}, "to": {}, "rel": null}}}, "emitted_at": 1720179595472}
{"stream": "ticket_audits", "data": {"id": 10020982311311, "ticket_id": 160, "created_at": "2024-06-19T09:27:57Z", "author_id": 360786799676, "metadata": {"system": {"client": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", "ip_address": "45.89.90.157", "location": "Lviv, 46, Ukraine", "latitude": 49.839, "longitude": 24.0191}, "custom": {}}, "events": [{"id": 10020982311439, "type": "Change", "value": "normal", "field_name": "priority", "previous_value": "high"}], "via": {"channel": "web", "source": {"from": {}, "to": {}, "rel": null}}}, "emitted_at": 1720179595483}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 79c1aa37-dae3-42ae-b333-d1c105477715
dockerImageTag: 3.0.1
dockerImageTag: 4.0.0
dockerRepository: airbyte/source-zendesk-support
documentationUrl: https://docs.airbyte.com/integrations/sources/zendesk-support
githubIssueLabel: source-zendesk-support
Expand Down Expand Up @@ -44,6 +44,13 @@ data:
- scopeType: stream
impactedScopes:
- "ticket_metrics"
4.0.0:
message: "This version includes breaking changes to the `Tags` stream. The pagination strategy has been changed from `Offset` to `Cursor-Based`. It is necessary to reset the stream. Please see the migration guide for additional details."
upgradeDeadline: "2024-09-09"
scopedImpact:
- scopeType: stream
impactedScopes:
- "tags"
suggestedStreams:
streams:
- brands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "3.0.1"
version = "4.0.0"
name = "source-zendesk-support"
description = "Source implementation for Zendesk Support."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ definitions:

tags_stream:
$ref: "#/definitions/base_stream"
retriever:
$ref: "#/definitions/retriever"
paginator:
$ref: "#/definitions/links_next_paginator"
$parameters:
name: "tags"
path: "tags"
Expand Down
57 changes: 57 additions & 0 deletions docs/integrations/sources/zendesk-support-migrations.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Zendesk Support Migration Guide

## Upgrading to 4.0.0

The pagination strategy has been changed from `Offset` to `Cursor-Based`. It is necessary to reset the stream.

### For Airbyte Open Source: Update the local connector image

Airbyte Open Source users must manually update the connector image in their local registry before proceeding with the migration. To do so:

1. Select **Settings** in the main navbar.
- Select **Sources**.
2. Find Zendesk Support in the list of connectors.

:::note
You will see two versions listed, the current in-use version and the latest version available.
:::

3. Select **Change** to update your OSS version to the latest available version.

### For Airbyte Cloud: Update the connector version

1. Select **Sources** in the main navbar.
2. Select the instance of the connector you wish to upgrade.

:::note
Each instance of the connector must be updated separately. If you have created multiple instances of a connector, updating one will not affect the others.
:::

3. Select **Upgrade**
- Follow the prompt to confirm you are ready to upgrade to the new version.

### Refresh affected schemas and data

1. Select **Connections** in the main nav bar.
- Select the connection(s) affected by the update.
2. Select the **Replication** tab.
- Select **Refresh source schema**.
- Select **OK**.

:::note
Any detected schema changes will be listed for your review.
:::

3. Select **Save changes** at the bottom of the page.
- Ensure the **Refresh affected streams** option is checked.

:::note
Depending on destination type you may not be prompted to refresh your data. See below.
:::

4. Select **Save connection**.

:::note
This will refresh the data in your destination and initiate a fresh sync.
:::

For more information on refreshes your data in Airbyte, see [this page](https://docs.airbyte.com/operator-guides/refreshes).

## Upgrading to 3.0.0

`cursor_field` for `TicketsMetric` stream is changed to `generated_timestamp`. It is necessary to refresh the data and schema for the affected stream.
Expand Down
Loading

0 comments on commit 9eccb24

Please sign in to comment.