Skip to content

Commit

Permalink
🐛 Source Stripe: Break Python application with status 1 on exception (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi297 authored Apr 18, 2024
1 parent 9dfd1aa commit 4b090d5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: e094cb9a-26de-4645-8761-65c0c425d1de
dockerImageTag: 5.3.4
dockerImageTag: 5.3.5
dockerRepository: airbyte/source-stripe
documentationUrl: https://docs.airbyte.com/integrations/sources/stripe
githubIssueLabel: source-stripe
Expand Down
6 changes: 3 additions & 3 deletions airbyte-integrations/connectors/source-stripe/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "5.3.4"
version = "5.3.5"
name = "source-stripe"
description = "Source implementation for Stripe."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ def test_rate_limit_max_attempts_exceeded(self, http_mocker: HttpMocker) -> None
source = SourceStripe(config=_CONFIG, catalog=_create_catalog(), state=_NO_STATE)
actual_messages = read(source, config=_CONFIG, catalog=_create_catalog())

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

@HttpMocker()
def test_incremental_rate_limit_max_attempts_exceeded(self, http_mocker: HttpMocker) -> None:
Expand Down Expand Up @@ -656,4 +657,5 @@ def test_server_error_max_attempts_exceeded(self, http_mocker: HttpMocker) -> No
source = SourceStripe(config=_CONFIG, catalog=_create_catalog(), state=_NO_STATE)
actual_messages = read(source, config=_CONFIG, catalog=_create_catalog())

assert len(actual_messages.errors) == 1
# first error is the actual error, second is to break the Python app with code != 0
assert list(map(lambda message: message.trace.error.failure_type, actual_messages.errors)) == [FailureType.system_error, FailureType.config_error]
5 changes: 3 additions & 2 deletions docs/integrations/sources/stripe.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ Each record is marked with `is_deleted` flag when the appropriate event happens

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 5.3.4 | 2024-04-11 | [37406](https://github.com/airbytehq/airbyte/pull/37406) | Update CDK version to have partitioned state fix |
| 5.3.3 | 2024-04-11 | [37001](https://github.com/airbytehq/airbyte/pull/37001) | Update airbyte-cdk to flush print buffer for every message |
| 5.3.5 | 2024-04-18 | [37418](https://github.com/airbytehq/airbyte/pull/37418) | Ensure python return code != 0 in case of error |
| 5.3.4 | 2024-04-11 | [37406](https://github.com/airbytehq/airbyte/pull/37406) | Update CDK version to have partitioned state fix |
| 5.3.3 | 2024-04-11 | [37001](https://github.com/airbytehq/airbyte/pull/37001) | Update airbyte-cdk to flush print buffer for every message |
| 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 |
| 5.3.1 | 2024-04-10 | [36960](https://github.com/airbytehq/airbyte/pull/36960) | Remove unused imports |
| 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 |
Expand Down

0 comments on commit 4b090d5

Please sign in to comment.