Skip to content

Commit 71065f0

Browse files
author
maxime.c
committed
coderabbitai
1 parent f247e93 commit 71065f0

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,7 @@ def _get_url(req: Requester) -> str:
33333333
and model.pagination_reset
33343334
and model.pagination_reset.limits
33353335
):
3336-
raise ValueError("PaginationResetLimits are not support while having record filter.")
3336+
raise ValueError("PaginationResetLimits are not supported while having record filter.")
33373337

33383338
return SimpleRetriever(
33393339
name=name,

airbyte_cdk/sources/streams/concurrent/cursor.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -546,17 +546,20 @@ def reduce_slice_range(self, stream_slice: StreamSlice) -> StreamSlice:
546546
"Attempting to reduce slice while records are not returned in incremental order might lead to missing records"
547547
)
548548

549-
return StreamSlice(
550-
partition=stream_slice.partition,
551-
cursor_slice={
552-
self._slice_boundary_fields_wrapper[
553-
self._START_BOUNDARY
554-
]: self._connector_state_converter.output_format(
555-
self._most_recent_cursor_value_per_partition[stream_slice]
556-
),
557-
self._slice_boundary_fields_wrapper[self._END_BOUNDARY]: stream_slice.cursor_slice[
558-
self._slice_boundary_fields_wrapper[self._END_BOUNDARY]
559-
],
560-
},
561-
extra_fields=stream_slice.extra_fields,
562-
)
549+
if stream_slice in self._most_recent_cursor_value_per_partition:
550+
return StreamSlice(
551+
partition=stream_slice.partition,
552+
cursor_slice={
553+
self._slice_boundary_fields_wrapper[
554+
self._START_BOUNDARY
555+
]: self._connector_state_converter.output_format(
556+
self._most_recent_cursor_value_per_partition[stream_slice]
557+
),
558+
self._slice_boundary_fields_wrapper[self._END_BOUNDARY]: stream_slice.cursor_slice[
559+
self._slice_boundary_fields_wrapper[self._END_BOUNDARY]
560+
],
561+
},
562+
extra_fields=stream_slice.extra_fields,
563+
)
564+
else:
565+
return stream_slice

0 commit comments

Comments
 (0)