Closed
Description
Connector Name
source-opsgenie
Connector Version
0.3.0
What step the error happened?
During the sync
Relevant information
This error happens when syncing alerts from the Opsgenie EU Api using the Opsgenie source connector.
Configuration:
- api_token: [REDACTED]
- endpoint: api.eu.opsgenie.com
- start_date: 2024-01-01T00:00:00Z
We have tried both using both "Incremental - Append" and "Incremental - Append + Deduped" replication modes. Both result in the same error.
Furthermore it looks like the connector is making too many requests against the Opsgenie API given that the log also contains a bunch of 429
responses:
2024-02-08 14:20:41 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=160&order=asc, Response Code: 429, Response Text: {"requestId":"f73c22b2-68ca-48a6-9b16-3186ec4135c5","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.002})
2024-02-08 14:20:41 source > Caught retryable error 'Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=160&order=asc, Response Code: 429, Response Text: {"requestId":"f73c22b2-68ca-48a6-9b16-3186ec4135c5","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.002}' after 1 tries. Waiting 5 seconds then retrying...
2024-02-08 14:20:47 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=240&order=asc, Response Code: 429, Response Text: {"requestId":"95911c6c-6a8e-4b03-8b62-03a813219326","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.001})
2024-02-08 14:20:47 source > Caught retryable error 'Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=240&order=asc, Response Code: 429, Response Text: {"requestId":"95911c6c-6a8e-4b03-8b62-03a813219326","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.001}' after 1 tries. Waiting 5 seconds then retrying...
2024-02-08 14:20:53 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=340&order=asc, Response Code: 429, Response Text: {"requestId":"9a6da3a2-04ed-4505-ab07-ffeb332e7821","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.001})
2024-02-08 14:20:53 source > Caught retryable error 'Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=340&order=asc, Response Code: 429, Response Text: {"requestId":"9a6da3a2-04ed-4505-ab07-ffeb332e7821","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.001}' after 1 tries. Waiting 5 seconds then retrying...
2024-02-08 14:20:59 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=440&order=asc, Response Code: 429, Response Text: {"requestId":"a7178a16-7dae-4ec4-aa9c-7dc78bee34f8","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.002})
2024-02-08 14:20:59 source > Caught retryable error 'Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=440&order=asc, Response Code: 429, Response Text: {"requestId":"a7178a16-7dae-4ec4-aa9c-7dc78bee34f8","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.002}' after 1 tries. Waiting 5 seconds then retrying...
2024-02-08 14:21:06 source > Backing off _send(...) for 5.0s (airbyte_cdk.sources.streams.http.exceptions.DefaultBackoffException: Request URL: https://api.eu.opsgenie.com/v2/alerts?limit=20&sort=createdAt&offset=620&order=asc, Response Code: 429, Response Text: {"requestId":"aec9963f-832d-4ab5-9c63-737702edc206","message":"You are making too many requests! To avoid errors, we recommend you limit requests.","took":0.002})
...
Relevant log output
2024-02-08 14:24:26 source > Encountered an exception while reading stream alerts
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 122, in read
yield from self._read_stream(
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 194, in _read_stream
for record in record_iterator:
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 230, in _read_incremental
for record_data_or_message in stream_instance.read_incremental(
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/core.py", line 156, in read_incremental
for record_data_or_message in records:
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py", line 104, in read_records
yield from self.retriever.read_records(stream_slice)
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 305, in read_records
most_recent_record_from_slice = self._get_most_recent_record(most_recent_record_from_slice, stream_data, stream_slice)
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 319, in _get_most_recent_record
return current_most_recent if self.cursor.is_greater_than_or_equal(current_most_recent, record) else record
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py", line 283, in is_greater_than_or_equal
return self.parse_date(first_cursor_value) >= self.parse_date(second_cursor_value)
File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py", line 196, in parse_date
raise ValueError(f"No format in {self.cursor_datetime_formats} matching {date}")
ValueError: No format in ['%Y-%m-%dT%H:%M:%S.%fZ'] matching 2020-11-11T17:46:02Z
2024-02-08 14:24:26 source > Marking stream alerts as STOPPED
Contribute
- Yes, I want to contribute