port-ocean 0.12.2.dev17__py3-none-any.whl → 0.12.2.dev19__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.
- port_ocean/ocean.py +12 -9
- port_ocean/run.py +3 -3
- {port_ocean-0.12.2.dev17.dist-info → port_ocean-0.12.2.dev19.dist-info}/METADATA +3 -3
- {port_ocean-0.12.2.dev17.dist-info → port_ocean-0.12.2.dev19.dist-info}/RECORD +7 -7
- {port_ocean-0.12.2.dev17.dist-info → port_ocean-0.12.2.dev19.dist-info}/LICENSE.md +0 -0
- {port_ocean-0.12.2.dev17.dist-info → port_ocean-0.12.2.dev19.dist-info}/WHEEL +0 -0
- {port_ocean-0.12.2.dev17.dist-info → port_ocean-0.12.2.dev19.dist-info}/entry_points.txt +0 -0
port_ocean/ocean.py
CHANGED
|
@@ -18,8 +18,11 @@ from port_ocean.context.ocean import (
|
|
|
18
18
|
ocean,
|
|
19
19
|
initialize_port_ocean_context,
|
|
20
20
|
)
|
|
21
|
+
from port_ocean.core.handlers.resync_state_updater import ResyncStateUpdater
|
|
21
22
|
from port_ocean.core.integrations.base import BaseIntegration
|
|
22
23
|
from port_ocean.core.models import Runtime
|
|
24
|
+
from port_ocean.log.sensetive import sensitive_log_filter
|
|
25
|
+
from port_ocean.middlewares import request_handler
|
|
23
26
|
from port_ocean.utils.repeat import repeat_every
|
|
24
27
|
from port_ocean.utils.signal import signal_handler
|
|
25
28
|
from port_ocean.version import __integration_version__
|
|
@@ -36,7 +39,7 @@ class Ocean:
|
|
|
36
39
|
):
|
|
37
40
|
initialize_port_ocean_context(self)
|
|
38
41
|
self.fast_api_app = app or FastAPI()
|
|
39
|
-
|
|
42
|
+
self.fast_api_app.middleware("http")(request_handler)
|
|
40
43
|
|
|
41
44
|
self.config = IntegrationConfiguration(
|
|
42
45
|
# type: ignore
|
|
@@ -45,10 +48,10 @@ class Ocean:
|
|
|
45
48
|
)
|
|
46
49
|
|
|
47
50
|
# add the integration sensitive configuration to the sensitive patterns to mask out
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
sensitive_log_filter.hide_sensitive_strings(
|
|
52
|
+
*self.config.get_sensitive_fields_data()
|
|
53
|
+
)
|
|
54
|
+
self.integration_router = integration_router or APIRouter()
|
|
52
55
|
|
|
53
56
|
self.port_client = PortClient(
|
|
54
57
|
base_url=self.config.port.base_url,
|
|
@@ -62,9 +65,9 @@ class Ocean:
|
|
|
62
65
|
integration_class(ocean) if integration_class else BaseIntegration(ocean)
|
|
63
66
|
)
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
self.resync_state_updater = ResyncStateUpdater(
|
|
69
|
+
self.port_client, self.config.scheduled_resync_interval
|
|
70
|
+
)
|
|
68
71
|
|
|
69
72
|
def is_saas(self) -> bool:
|
|
70
73
|
return self.config.runtime == Runtime.Saas
|
|
@@ -109,7 +112,7 @@ class Ocean:
|
|
|
109
112
|
await repeated_function()
|
|
110
113
|
|
|
111
114
|
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
|
|
112
|
-
|
|
115
|
+
self.fast_api_app.include_router(self.integration_router, prefix="/integration")
|
|
113
116
|
|
|
114
117
|
@asynccontextmanager
|
|
115
118
|
async def lifecycle(_: FastAPI) -> AsyncIterator[None]:
|
port_ocean/run.py
CHANGED
|
@@ -7,8 +7,8 @@ from pydantic import BaseModel
|
|
|
7
7
|
|
|
8
8
|
from port_ocean.bootstrap import create_default_app
|
|
9
9
|
from port_ocean.config.dynamic import default_config_factory
|
|
10
|
-
from port_ocean.config.settings import
|
|
11
|
-
from port_ocean.core.defaults import initialize_defaults
|
|
10
|
+
from port_ocean.config.settings import ApplicationSettings, LogLevelType
|
|
11
|
+
from port_ocean.core.defaults.initialize import initialize_defaults
|
|
12
12
|
from port_ocean.core.utils import validate_integration_runtime
|
|
13
13
|
from port_ocean.log.logger_setup import setup_logger
|
|
14
14
|
from port_ocean.ocean import Ocean
|
|
@@ -60,4 +60,4 @@ def run(
|
|
|
60
60
|
|
|
61
61
|
initialize_defaults(app.integration.AppConfigHandlerClass.CONFIG_CLASS, app.config)
|
|
62
62
|
|
|
63
|
-
uvicorn.run(app, host="0.0.0.0", port=
|
|
63
|
+
uvicorn.run(app, host="0.0.0.0", port=application_settings.port)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: port-ocean
|
|
3
|
-
Version: 0.12.2.
|
|
3
|
+
Version: 0.12.2.dev19
|
|
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
|
|
@@ -26,7 +26,7 @@ Requires-Dist: aiostream (>=0.5.2,<0.7.0)
|
|
|
26
26
|
Requires-Dist: click (>=8.1.3,<9.0.0) ; extra == "cli"
|
|
27
27
|
Requires-Dist: confluent-kafka (>=2.1.1,<3.0.0)
|
|
28
28
|
Requires-Dist: cookiecutter (>=2.1.1,<3.0.0) ; extra == "cli"
|
|
29
|
-
Requires-Dist: fastapi (>=0.100,<0.
|
|
29
|
+
Requires-Dist: fastapi (>=0.100,<0.116)
|
|
30
30
|
Requires-Dist: httpx (>=0.24.1,<0.28.0)
|
|
31
31
|
Requires-Dist: jinja2-time (>=0.2.0,<0.3.0) ; extra == "cli"
|
|
32
32
|
Requires-Dist: jq (>=1.8.0,<2.0.0)
|
|
@@ -40,7 +40,7 @@ Requires-Dist: rich (>=13.4.1,<14.0.0) ; extra == "cli"
|
|
|
40
40
|
Requires-Dist: six (>=1.16.0,<2.0.0)
|
|
41
41
|
Requires-Dist: tomli (>=2.0.1,<3.0.0)
|
|
42
42
|
Requires-Dist: urllib3 (>=1.26.16,<3.0.0)
|
|
43
|
-
Requires-Dist: uvicorn (>=0.22,<0.
|
|
43
|
+
Requires-Dist: uvicorn (>=0.22,<0.33)
|
|
44
44
|
Requires-Dist: werkzeug (>=2.3.4,<4.0.0)
|
|
45
45
|
Project-URL: Repository, https://github.com/port-labs/Port-Ocean
|
|
46
46
|
Description-Content-Type: text/markdown
|
|
@@ -115,9 +115,9 @@ port_ocean/log/handlers.py,sha256=k9G_Mb4ga2-Jke9irpdlYqj6EYiwv0gEsh4TgyqqOmI,28
|
|
|
115
115
|
port_ocean/log/logger_setup.py,sha256=qSeVwnivV4WoLx_4SfBwn2PtmUpNdkSEgfm0C8B3yUw,2332
|
|
116
116
|
port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
|
|
117
117
|
port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
|
|
118
|
-
port_ocean/ocean.py,sha256=
|
|
118
|
+
port_ocean/ocean.py,sha256=Xsda8kkDk-8qnzFFw08M1YS0LJpLj4PB0UpfsK9Oc2o,5029
|
|
119
119
|
port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
120
|
-
port_ocean/run.py,sha256=
|
|
120
|
+
port_ocean/run.py,sha256=rTxBlrQd4yyrtgErCFJCHCEHs7d1OXrRiJehUYmIbN0,2212
|
|
121
121
|
port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
|
|
122
122
|
port_ocean/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
123
|
port_ocean/tests/clients/port/mixins/test_entities.py,sha256=A9myrnkLhKSQrnOLv1Zz2wiOVSxW65Q9RIUIRbn_V7w,1586
|
|
@@ -140,8 +140,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
|
|
|
140
140
|
port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
|
|
141
141
|
port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
|
|
142
142
|
port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
|
|
143
|
-
port_ocean-0.12.2.
|
|
144
|
-
port_ocean-0.12.2.
|
|
145
|
-
port_ocean-0.12.2.
|
|
146
|
-
port_ocean-0.12.2.
|
|
147
|
-
port_ocean-0.12.2.
|
|
143
|
+
port_ocean-0.12.2.dev19.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
144
|
+
port_ocean-0.12.2.dev19.dist-info/METADATA,sha256=XF9sfB-p8-VAY-p6uUI2zajWLT9FyCZ1w4qmK-opzF0,6671
|
|
145
|
+
port_ocean-0.12.2.dev19.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
146
|
+
port_ocean-0.12.2.dev19.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
|
|
147
|
+
port_ocean-0.12.2.dev19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|