airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
14.72k stars 3.78k forks source link

[source-zendesk-support] Please switch to Cursor Pagination at the earliest #38595

Open jgournet opened 1 month ago

jgournet commented 1 month ago

Connector Name

source-zendesk

Connector Version

2.6.4

What step the error happened?

During the sync

Relevant information

Seems to be happening only on "organization_memberships" that we know, so far

Relevant log output

airbyte-production orchestrator-repl-job-2-attempt-2 main 2024-05-23 06:37:29 replication-orchestrator > failures: [ {
airbyte-production orchestrator-repl-job-2-attempt-2 main   "failureOrigin" : "source",
airbyte-production orchestrator-repl-job-2-attempt-2 main   "failureType" : "system_error",
airbyte-production orchestrator-repl-job-2-attempt-2 main   "internalMessage" : "Request to https://sf360.zendesk.com/api/v2/organization_memberships.json?page=101&per_page=100 failed with status code 400 and error message There are limits to the page depth in Offset Pagination. Offset Pagination will be deprecated fully in the near future.\nPlease switch to Cursor Pagination at the earliest. Cursor Pagination does not have any limits.\nSee https://developer.zendesk.com/documentation/api-basics/pagination/comparing-cursor-pagination-and-offset-pagination\n",
airbyte-production orchestrator-repl-job-2-attempt-2 main   "externalMessage" : "Something went wrong in the connector. See the logs for more details.",
airbyte-production orchestrator-repl-job-2-attempt-2 main   "metadata" : {
airbyte-production orchestrator-repl-job-2-attempt-2 main     "attemptNumber" : 2,
airbyte-production orchestrator-repl-job-2-attempt-2 main     "jobId" : 2,
airbyte-production orchestrator-repl-job-2-attempt-2 main     "from_trace_message" : true,
airbyte-production orchestrator-repl-job-2-attempt-2 main     "connector_command" : "read"
airbyte-production orchestrator-repl-job-2-attempt-2 main   },
airbyte-production orchestrator-repl-job-2-attempt-2 main   "stacktrace" : "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py\", line 136, in read\n    yield from self._read_stream(\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py\", line 237, in _read_stream\n    for record_data_or_message in record_iterator:\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/core.py\", line 145, in read\n    for record_data_or_message in records:\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py\", line 120, in read_records\n    yield from self.retriever.read_records(self.get_json_schema(), stream_slice)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py\", line 324, in read_records\n    for stream_data in self._read_pages(record_generator, self.state, _slice):\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py\", line 288, in _read_pages\n    response = self._fetch_next_page(stream_state, stream_slice, next_page_token)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py\", line 263, in _fetch_next_page\n    return self.requester.send_request(\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/requesters/http_requester.py\", line 461, in send_request\n    return self._validate_response(response)\n  File \"/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/requesters/http_requester.py\", line 566, in _validate_response\n    raise ReadException(error_message)\nairbyte_cdk.sources.declarative.exceptions.ReadException: Request to https://sf360.zendesk.com/api/v2/organization_memberships.json?page=101&per_page=100 failed with status code 400 and error message There are limits to the page depth in Offset Pagination. Offset Pagination will be deprecated fully in the near future.\nPlease switch to Cursor Pagination at the earliest. Cursor Pagination does not have any limits.\nSee https://developer.zendesk.com/documentation/api-basics/pagination/comparing-cursor-pagination-and-offset-pagination\n\n",
airbyte-production orchestrator-repl-job-2-attempt-2 main   "timestamp" : 1716445988144,
airbyte-production orchestrator-repl-job-2-attempt-2 main   "streamDescriptor" : {
airbyte-production orchestrator-repl-job-2-attempt-2 main     "name" : "organization_memberships"
airbyte-production orchestrator-repl-job-2-attempt-2 main   }
airbyte-production orchestrator-repl-job-2-attempt-2 main },


### Contribute

- [ ] Yes, I want to contribute
marcosmarxm commented 1 month ago

Thank you @jgournet for raising the issue. It's been added to the task list of the connector team for further review.