Skip to content

Commit 6439f74

Browse files
committed
code review
1 parent d209fca commit 6439f74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ def create_concurrent_cursor_from_incrementing_count_cursor(
14741474
stream_namespace: Optional[str],
14751475
config: Config,
14761476
message_repository: Optional[MessageRepository] = None,
1477+
stream_state_migrations: Optional[List[Any]] = None,
14771478
**kwargs: Any,
14781479
) -> ConcurrentCursor:
14791480
# Per-partition incremental streams can dynamically create child cursors which will pass their current
@@ -1484,6 +1485,7 @@ def create_concurrent_cursor_from_incrementing_count_cursor(
14841485
if "stream_state" not in kwargs
14851486
else kwargs["stream_state"]
14861487
)
1488+
stream_state = self.apply_stream_state_migrations(stream_state_migrations, stream_state)
14871489

14881490
component_type = component_definition.get("type")
14891491
if component_definition.get("type") != model_type.__name__:
@@ -2186,7 +2188,8 @@ def _build_concurrent_cursor(
21862188
)
21872189

21882190
if model.incremental_sync and stream_slicer:
2189-
# FIXME should this be in create_concurrent_cursor_from_perpartition_cursor
2191+
# FIXME there is a discrepancy where this logic is applied on the create_*_cursor methods for
2192+
# ConcurrentCursor but it is applied outside of create_concurrent_cursor_from_perpartition_cursor
21902193
if model.state_migrations:
21912194
state_transformations = [
21922195
self._create_component_from_model(
@@ -3327,7 +3330,7 @@ def _get_url() -> str:
33273330
),
33283331
)
33293332

3330-
cursor_used_for_stop_condition = cursor if stop_condition_cursor else None
3333+
cursor_used_for_stop_condition = stop_condition_cursor or None
33313334
paginator = (
33323335
self._create_component_from_model(
33333336
model=model.paginator,

0 commit comments

Comments
 (0)