Skip to content

Commit 4b090d5

Browse files
authored
🐛 Source Stripe: Break Python application with status 1 on exception (#37418)
1 parent 9dfd1aa commit 4b090d5

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
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.3.4
13+
dockerImageTag: 5.3.5
1414
dockerRepository: airbyte/source-stripe
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/stripe
1616
githubIssueLabel: source-stripe

airbyte-integrations/connectors/source-stripe/poetry.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.3.4"
6+
version = "5.3.5"
77
name = "source-stripe"
88
description = "Source implementation for Stripe."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-stripe/unit_tests/integration/test_persons.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,8 @@ def test_rate_limit_max_attempts_exceeded(self, http_mocker: HttpMocker) -> None
535535
source = SourceStripe(config=_CONFIG, catalog=_create_catalog(), state=_NO_STATE)
536536
actual_messages = read(source, config=_CONFIG, catalog=_create_catalog())
537537

538-
assert len(actual_messages.errors) == 1
538+
# first error is the actual error, second is to break the Python app with code != 0
539+
assert list(map(lambda message: message.trace.error.failure_type, actual_messages.errors)) == [FailureType.system_error, FailureType.config_error]
539540

540541
@HttpMocker()
541542
def test_incremental_rate_limit_max_attempts_exceeded(self, http_mocker: HttpMocker) -> None:
@@ -656,4 +657,5 @@ def test_server_error_max_attempts_exceeded(self, http_mocker: HttpMocker) -> No
656657
source = SourceStripe(config=_CONFIG, catalog=_create_catalog(), state=_NO_STATE)
657658
actual_messages = read(source, config=_CONFIG, catalog=_create_catalog())
658659

659-
assert len(actual_messages.errors) == 1
660+
# first error is the actual error, second is to break the Python app with code != 0
661+
assert list(map(lambda message: message.trace.error.failure_type, actual_messages.errors)) == [FailureType.system_error, FailureType.config_error]

docs/integrations/sources/stripe.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,9 @@ Each record is marked with `is_deleted` flag when the appropriate event happens
223223

224224
| Version | Date | Pull Request | Subject |
225225
|:--------|:-----------|:------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
226-
| 5.3.4 | 2024-04-11 | [37406](https://github.com/airbytehq/airbyte/pull/37406) | Update CDK version to have partitioned state fix |
227-
| 5.3.3 | 2024-04-11 | [37001](https://github.com/airbytehq/airbyte/pull/37001) | Update airbyte-cdk to flush print buffer for every message |
226+
| 5.3.5 | 2024-04-18 | [37418](https://github.com/airbytehq/airbyte/pull/37418) | Ensure python return code != 0 in case of error |
227+
| 5.3.4 | 2024-04-11 | [37406](https://github.com/airbytehq/airbyte/pull/37406) | Update CDK version to have partitioned state fix |
228+
| 5.3.3 | 2024-04-11 | [37001](https://github.com/airbytehq/airbyte/pull/37001) | Update airbyte-cdk to flush print buffer for every message |
228229
| 5.3.2 | 2024-04-11 | [36964](https://github.com/airbytehq/airbyte/pull/36964) | Update CDK version to fix breaking change before another devs work on it |
229230
| 5.3.1 | 2024-04-10 | [36960](https://github.com/airbytehq/airbyte/pull/36960) | Remove unused imports |
230231
| 5.3.0 | 2024-03-12 | [35978](https://github.com/airbytehq/airbyte/pull/35978) | Upgrade CDK to start emitting record counts with state and full refresh state |

0 commit comments

Comments
 (0)