Skip to content

Commit a6990bc

Browse files
Source Recharge: use default availability strategy (#22473)
* Source Recharge: use default availability strategy * Remove invalid_config from full_refresh tests * Update changelog * Remove error handling that is covered by HttpAvailabilityStrategy * Keep should_retry, change error handling --------- Co-authored-by: Serhii Lazebnyi <[email protected]>
1 parent c2ee081 commit a6990bc

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,9 @@
14651465
icon: recharge.svg
14661466
sourceType: api
14671467
releaseStage: generally_available
1468+
allowedHosts:
1469+
hosts:
1470+
- api.rechargeapps.com
14681471
- name: Recreation
14691472
sourceDefinitionId: 25d7535d-91e0-466a-aa7f-af81578be277
14701473
dockerRepository: airbyte/source-recreation

airbyte-integrations/connectors/source-recharge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.2.5
15+
LABEL io.airbyte.version=0.2.6
1616
LABEL io.airbyte.name=airbyte/source-recharge

airbyte-integrations/connectors/source-recharge/source_recharge/api.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import pendulum
1010
import requests
11-
from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
1211
from airbyte_cdk.sources.streams.http import HttpStream
1312
from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer
1413

@@ -29,10 +28,6 @@ class RechargeStream(HttpStream, ABC):
2928
def data_path(self):
3029
return self.name
3130

32-
@property
33-
def availability_strategy(self) -> Optional["AvailabilityStrategy"]:
34-
return None
35-
3631
def path(
3732
self, stream_state: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None
3833
) -> str:
@@ -72,10 +67,6 @@ def should_retry(self, response: requests.Response) -> bool:
7267

7368
if incomplete_data_response:
7469
return True
75-
elif response.status_code == requests.codes.FORBIDDEN:
76-
setattr(self, "raise_on_http_errors", False)
77-
self.logger.error(f"Skiping stream {self.name} because of a 403 error.")
78-
return False
7970

8071
return super().should_retry(response)
8172

docs/integrations/sources/recharge.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ The Recharge connector should gracefully handle Recharge API limitations under n
7676

7777
| Version | Date | Pull Request | Subject |
7878
|:--------| :--------- | :------------------------------------------------------- | :---------------------------------------------------------------------------------------- |
79+
| 0.2.6 | 2023-02-07 | [22473](https://github.com/airbytehq/airbyte/pull/22473) | Use default availability strategy
7980
| 0.2.5 | 2023-01-27 | [22021](https://github.com/airbytehq/airbyte/pull/22021) | Set `AvailabilityStrategy` for streams explicitly to `None` |
8081
| 0.2.4 | 2022-10-11 | [17822](https://github.com/airbytehq/airbyte/pull/17822) | Do not parse JSON in `should_retry` |
8182
| 0.2.3 | 2022-10-11 | [17822](https://github.com/airbytehq/airbyte/pull/17822) | Do not parse JSON in `should_retry` |

0 commit comments

Comments
 (0)