Skip to content

Commit 09fef1c

Browse files
authored
Fix pagination issue while setting is_resumable properly (#45101)
1 parent 5d1c2bf commit 09fef1c

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

airbyte-integrations/connectors/source-stripe/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data:
1010
connectorSubtype: api
1111
connectorType: source
1212
definitionId: e094cb9a-26de-4645-8761-65c0c425d1de
13-
dockerImageTag: 5.5.2
13+
dockerImageTag: 5.5.3
1414
dockerRepository: airbyte/source-stripe
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/stripe
1616
erdUrl: https://dbdocs.io/airbyteio/source-stripe?view=relationships

airbyte-integrations/connectors/source-stripe/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "5.5.2"
6+
version = "5.5.3"
77
name = "source-stripe"
88
description = "Source implementation for Stripe."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-stripe/source_stripe/streams.py

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def extract_records(
9393

9494

9595
class StripeStream(HttpStream, ABC):
96+
is_resumable = False
9697
url_base = "https://api.stripe.com/v1/"
9798
DEFAULT_SLICE_RANGE = 365
9899
transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)
@@ -234,6 +235,7 @@ def get_parent_stream(self, stream_state: Mapping[str, Any]) -> StripeStream:
234235

235236

236237
class CreatedCursorIncrementalStripeStream(StripeStream):
238+
is_resumable = True
237239
# Stripe returns most recently created objects first, so we don't want to persist state until the entire stream has been read
238240
state_checkpoint_interval = math.inf
239241

@@ -337,6 +339,7 @@ def path(self, **kwargs):
337339

338340

339341
class UpdatedCursorIncrementalStripeStream(StripeStream):
342+
is_resumable = True
340343
"""
341344
`CreatedCursorIncrementalStripeStream` does not provide a way to read updated data since given date because the API does not allow to do this.
342345
It only returns newly created entities since given date. So to have all the updated data as well we need to make use of the Events API,
@@ -452,6 +455,7 @@ def get_parent_stream(self, stream_state: Mapping[str, Any]) -> StripeStream:
452455

453456

454457
class IncrementalStripeStream(StripeStream):
458+
is_resumable = True
455459
"""
456460
This class combines both normal incremental sync and event based sync. It uses common endpoints for sliced data syncs in
457461
the full refresh sync mode and initial incremental sync. For incremental syncs with a state, event based sync comes into action.
@@ -720,6 +724,7 @@ def get_parent_stream(self, stream_state: Mapping[str, Any]) -> StripeStream:
720724

721725

722726
class UpdatedCursorIncrementalStripeLazySubStream(StripeStream, ABC):
727+
is_resumable = True
723728
"""
724729
This stream uses StripeLazySubStream under the hood to run full refresh or initial incremental syncs.
725730
In case of subsequent incremental syncs, it uses the UpdatedCursorIncrementalStripeStream class.
@@ -793,6 +798,7 @@ def read_records(
793798

794799

795800
class ParentIncrementalStipeSubStream(StripeSubStream):
801+
is_resumable = True
796802
"""
797803
This stream differs from others in that it runs parent stream in exactly same sync mode it is run itself to generate stream slices.
798804
It also uses regular /v1 API endpoints to sync data no matter what the sync mode is. This means that the event-based API can only

docs/integrations/sources/stripe.md

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ Each record is marked with `is_deleted` flag when the appropriate event happens
236236

237237
| Version | Date | Pull Request | Subject |
238238
|:--------|:-----------| :-------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
239+
| 5.5.3 | 2024-09-03 | [45101](https://github.com/airbytehq/airbyte/pull/45101) | Fix regression followoing pagination issue fix |
239240
| 5.5.2 | 2024-08-28 | [44862](https://github.com/airbytehq/airbyte/pull/44862) | Fix RFR pagination issue |
240241
| 5.5.1 | 2024-08-10 | [43105](https://github.com/airbytehq/airbyte/pull/43105) | Update dependencies |
241242
| 5.5.0 | 2024-08-08 | [43302](https://github.com/airbytehq/airbyte/pull/43302) | Fix problem with state not updating and upgrade cdk 4

0 commit comments

Comments
 (0)