Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Recharge: use default availability strategy #22473

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,9 @@
icon: recharge.svg
sourceType: api
releaseStage: generally_available
allowedHosts:
hosts:
- api.rechargeapps.com
- name: Recreation
sourceDefinitionId: 25d7535d-91e0-466a-aa7f-af81578be277
dockerRepository: airbyte/source-recreation
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-recharge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.5
LABEL io.airbyte.version=0.2.6
LABEL io.airbyte.name=airbyte/source-recharge
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pendulum
import requests
from airbyte_cdk.sources.streams.availability_strategy import AvailabilityStrategy
from airbyte_cdk.sources.streams.http import HttpStream
from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer

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

@property
def availability_strategy(self) -> Optional["AvailabilityStrategy"]:
return None

def path(
self, stream_state: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, next_page_token: Mapping[str, Any] = None
) -> str:
Expand Down Expand Up @@ -72,10 +67,6 @@ def should_retry(self, response: requests.Response) -> bool:

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

return super().should_retry(response)

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/recharge.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The Recharge connector should gracefully handle Recharge API limitations under n

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