MeltanoLabs / tap-cloudwatch

Apache License 2.0
1 stars 1 forks source link

bug: `End time cannot be less than Start time` #60

Open pnadolny13 opened 1 year ago

pnadolny13 commented 1 year ago

My pipeline has been running with no problems for ~5 months. Today it failed because the query batch window was broken, the start date was after the end date. It looks like it was the last batch and must be using some sort of logic with current time that hit an edge case. We should either fix the core of it where the max the start date can be is less than or equal to the end date/current time. Another option is to assert the start date is before the end date and skip it if not but this is a little heavy handed and could be risky if other bugs come up and it skips batches mid sync vs the last batch up to current time, probably avoid this if possible.

Execution ID: 21c875d9c0854236a004a70b73202cf9

tap_cloudwatch.subquery | Submitting query for batch from: `2023-07-18T10:01:05 UTC` - `2023-07-18T10:01:13 UTC`
....
tap_cloudwatch.subquery | Submitting query for batch from: `2023-07-19T06:01:14 UTC` - `2023-07-19T06:01:13 UTC
....
botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameterException) when calling the StartQuery operation: End time cannot be less than Start time (Service: AWSLogs; Status Code: 400; Error Code: InvalidParameterException
pnadolny13 commented 1 year ago

This happened again today:

tap_cloudwatch.subquery | Submitting query for batch from: `2023-08-30T06:01:25 UTC` - `2023-08-30T06:01:24 UTC`