diff --git a/CHANGELOG.md b/CHANGELOG.md index 037bca6467..f9a9c27101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## 0.4.16 (2024-01-11) + + +### Improvements + +- Increased the default timeout for requests to 3rd party targets to 30 seconds, and made it configurable (PORT-6074) + + ## 0.4.15 (2024-01-07) diff --git a/port_ocean/config/settings.py b/port_ocean/config/settings.py index 0f392b920b..0472511358 100644 --- a/port_ocean/config/settings.py +++ b/port_ocean/config/settings.py @@ -41,6 +41,7 @@ def validate_lower(cls, v: str) -> str: class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow): initialize_port_resources: bool = True scheduled_resync_interval: int | None = None + client_timeout: int = 30 port: PortSettings event_listener: EventListenerSettingsType integration: IntegrationSettings diff --git a/port_ocean/utils.py b/port_ocean/utils.py index 78ca894d1f..5c64de70cf 100644 --- a/port_ocean/utils.py +++ b/port_ocean/utils.py @@ -18,6 +18,7 @@ from werkzeug.local import LocalStack, LocalProxy from port_ocean.helpers.async_client import OceanAsyncClient +from port_ocean.context.ocean import ocean from port_ocean.helpers.retry import RetryTransport _http_client: LocalStack[httpx.AsyncClient] = LocalStack() @@ -26,7 +27,7 @@ def _get_http_client_context() -> httpx.AsyncClient: client = _http_client.top if client is None: - client = OceanAsyncClient(RetryTransport) + client = OceanAsyncClient(RetryTransport, timeout=ocean.config.client_timeout) _http_client.push(client) return client diff --git a/pyproject.toml b/pyproject.toml index 8d51538848..b2628f4f59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [tool.poetry] name = "port-ocean" -version = "0.4.15" +version = "0.4.16" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io" repository = "https://github.com/port-labs/Port-Ocean" -authors = ["Daniel Sinai ", "Yair Siman-Tov "] +authors = ["Daniel Sinai ", "Yair Siman-Tov ", "Tom Tankilevitch "] packages = [ { include = "port_ocean", from = "." } ]