port-ocean 0.14.2__py3-none-any.whl → 0.14.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of port-ocean might be problematic. Click here for more details.

@@ -16,7 +16,7 @@ if TYPE_CHECKING:
16
16
  # period of time, before raising an exception.
17
17
  # The max_connections value can't be too high, as it will cause the application to run out of memory.
18
18
  # The max_keepalive_connections can't be too high, as it will cause the application to run out of available connections.
19
- PORT_HTTP_MAX_CONNECTIONS_LIMIT = 200
19
+ PORT_HTTP_MAX_CONNECTIONS_LIMIT = 100
20
20
  PORT_HTTP_MAX_KEEP_ALIVE_CONNECTIONS = 50
21
21
  PORT_HTTP_TIMEOUT = 60.0
22
22
 
@@ -28,13 +28,19 @@ PORT_HTTPX_LIMITS = httpx.Limits(
28
28
 
29
29
  _http_client: LocalStack[httpx.AsyncClient] = LocalStack()
30
30
 
31
+ FIVE_MINUETS = 60 * 5
32
+
31
33
 
32
34
  def _get_http_client_context(port_client: "PortClient") -> httpx.AsyncClient:
33
35
  client = _http_client.top
34
36
  if client is None:
35
37
  client = OceanAsyncClient(
36
38
  TokenRetryTransport,
37
- transport_kwargs={"port_client": port_client},
39
+ transport_kwargs={
40
+ "port_client": port_client,
41
+ "max_backoff_wait": FIVE_MINUETS,
42
+ "base_delay": 0.3,
43
+ },
38
44
  timeout=PORT_HTTPX_TIMEOUT,
39
45
  limits=PORT_HTTPX_LIMITS,
40
46
  )
@@ -55,14 +55,14 @@ class RetryTransport(httpx.AsyncBaseTransport, httpx.BaseTransport):
55
55
  HTTPStatus.GATEWAY_TIMEOUT,
56
56
  ]
57
57
  )
58
- MAX_BACKOFF_WAIT = 60
58
+ MAX_BACKOFF_WAIT_IN_SECONDS = 60
59
59
 
60
60
  def __init__(
61
61
  self,
62
62
  wrapped_transport: Union[httpx.BaseTransport, httpx.AsyncBaseTransport],
63
63
  max_attempts: int = 10,
64
- max_backoff_wait: float = MAX_BACKOFF_WAIT,
65
- backoff_factor: float = 0.1,
64
+ max_backoff_wait: float = MAX_BACKOFF_WAIT_IN_SECONDS,
65
+ base_delay: float = 0.1,
66
66
  jitter_ratio: float = 0.1,
67
67
  respect_retry_after_header: bool = True,
68
68
  retryable_methods: Iterable[str] | None = None,
@@ -81,7 +81,7 @@ class RetryTransport(httpx.AsyncBaseTransport, httpx.BaseTransport):
81
81
  max_backoff_wait (float, optional):
82
82
  The maximum amount of time (in seconds) to wait before retrying a request.
83
83
  Defaults to 60.
84
- backoff_factor (float, optional):
84
+ base_delay (float, optional):
85
85
  The factor by which the waiting time will be multiplied in each retry attempt.
86
86
  Defaults to 0.1.
87
87
  jitter_ratio (float, optional):
@@ -105,7 +105,7 @@ class RetryTransport(httpx.AsyncBaseTransport, httpx.BaseTransport):
105
105
  )
106
106
 
107
107
  self._max_attempts = max_attempts
108
- self._backoff_factor = backoff_factor
108
+ self._base_delay = base_delay
109
109
  self._respect_retry_after_header = respect_retry_after_header
110
110
  self._retryable_methods = (
111
111
  frozenset(retryable_methods)
@@ -255,7 +255,7 @@ class RetryTransport(httpx.AsyncBaseTransport, httpx.BaseTransport):
255
255
  except ValueError:
256
256
  pass
257
257
 
258
- backoff = self._backoff_factor * (2 ** (attempts_made - 1))
258
+ backoff = self._base_delay * (2 ** (attempts_made - 1))
259
259
  jitter = (backoff * self._jitter_ratio) * random.choice([1, -1])
260
260
  total_backoff = backoff + jitter
261
261
  return min(total_backoff, self._max_backoff_wait)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.14.2
3
+ Version: 0.14.3
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -54,7 +54,7 @@ port_ocean/clients/port/mixins/integrations.py,sha256=t8OSa7Iopnpp8IOEcp3a7WgwOc
54
54
  port_ocean/clients/port/mixins/migrations.py,sha256=A6896oJF6WbFL2WroyTkMzr12yhVyWqGoq9dtLNSKBY,1457
55
55
  port_ocean/clients/port/retry_transport.py,sha256=PtIZOAZ6V-ncpVysRUsPOgt8Sf01QLnTKB5YeKBxkJk,1861
56
56
  port_ocean/clients/port/types.py,sha256=nvlgiAq4WH5_F7wQbz_GAWl-faob84LVgIjZ2Ww5mTk,451
57
- port_ocean/clients/port/utils.py,sha256=5B6rHgiVrtiL4YWh7Eq7_ncIeDwrDsB7jIvRik5xH8c,2373
57
+ port_ocean/clients/port/utils.py,sha256=SjhgmJXAqH2JqXfGy8GoGwzUYiJvUhWDrJyxQcenxZc,2512
58
58
  port_ocean/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  port_ocean/config/base.py,sha256=x1gFbzujrxn7EJudRT81C6eN9WsYAb3vOHwcpcpX8Tc,6370
60
60
  port_ocean/config/dynamic.py,sha256=qOFkRoJsn_BW7581omi_AoMxoHqasf_foxDQ_G11_SI,2030
@@ -115,7 +115,7 @@ port_ocean/exceptions/port_defaults.py,sha256=45Bno5JEB-GXztvKsy8mw7TrydQmw13-4J
115
115
  port_ocean/exceptions/utils.py,sha256=gjOqpi-HpY1l4WlMFsGA9yzhxDhajhoGGdDDyGbLnqI,197
116
116
  port_ocean/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
117
  port_ocean/helpers/async_client.py,sha256=SRlP6o7_FCSY3UHnRlZdezppePVxxOzZ0z861vE3K40,1783
118
- port_ocean/helpers/retry.py,sha256=IQ0RfQ2T5o6uoZh2WW2nrFH5TT6K_k3y2Im0HDp5j9Y,15059
118
+ port_ocean/helpers/retry.py,sha256=kNq2gKvTerwafI7c7K9wG0CXZGF2QnDX1HQbc-D3xQI,15061
119
119
  port_ocean/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  port_ocean/log/handlers.py,sha256=ncVjgqrZRh6BhyRrA6DQG86Wsbxph1yWYuEC0cWfe-Q,3631
121
121
  port_ocean/log/logger_setup.py,sha256=CoEDowe5OwNOL_5clU6Z4faktfh0VWaOTS0VLmyhHjw,2404
@@ -150,8 +150,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
150
150
  port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
151
151
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
152
152
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
153
- port_ocean-0.14.2.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
154
- port_ocean-0.14.2.dist-info/METADATA,sha256=6cVFmjKyKNooeZreDiW_c0mQXqI1IUpY2RFXE5fpkk0,6673
155
- port_ocean-0.14.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
156
- port_ocean-0.14.2.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
157
- port_ocean-0.14.2.dist-info/RECORD,,
153
+ port_ocean-0.14.3.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
154
+ port_ocean-0.14.3.dist-info/METADATA,sha256=GdDjDMztdU87YSd_BnwS8o14V_qGk7SdqVM3r-7vILI,6673
155
+ port_ocean-0.14.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
156
+ port_ocean-0.14.3.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
157
+ port_ocean-0.14.3.dist-info/RECORD,,