port-ocean 0.20.1__py3-none-any.whl → 0.20.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.

@@ -69,7 +69,10 @@ class IntegrationClientMixin:
69
69
  return response
70
70
 
71
71
  async def get_current_integration(
72
- self, should_raise: bool = True, should_log: bool = True
72
+ self,
73
+ should_raise: bool = True,
74
+ should_log: bool = True,
75
+ has_provision_feature_flag: bool = False,
73
76
  ) -> dict[str, Any]:
74
77
  response = await self._get_current_integration()
75
78
  handle_status_code(response, should_raise, should_log)
@@ -85,15 +88,7 @@ class IntegrationClientMixin:
85
88
  should_log,
86
89
  )
87
90
  )
88
- and (
89
- ORG_USE_PROVISIONED_DEFAULTS_FEATURE_FLAG
90
- in (
91
- await self.client.get_organization_feature_flags(
92
- should_raise,
93
- should_log,
94
- )
95
- )
96
- )
91
+ and has_provision_feature_flag
97
92
  )
98
93
 
99
94
  if is_provision_enabled_for_integration:
@@ -58,11 +58,14 @@ async def _initialize_required_integration_settings(
58
58
  port_client: PortClient,
59
59
  integration_config: IntegrationConfiguration,
60
60
  default_mapping: PortAppConfig | None = None,
61
+ has_provision_feature_flag: bool = False,
61
62
  ) -> None:
62
63
  try:
63
64
  logger.info("Initializing integration at port")
64
65
  integration = await port_client.get_current_integration(
65
- should_log=False, should_raise=False
66
+ should_log=False,
67
+ should_raise=False,
68
+ has_provision_feature_flag=has_provision_feature_flag,
66
69
  )
67
70
  if not integration:
68
71
  logger.info(
@@ -219,6 +222,10 @@ async def _initialize_defaults(
219
222
  )
220
223
  )
221
224
 
225
+ has_provision_feature_flag = ORG_USE_PROVISIONED_DEFAULTS_FEATURE_FLAG in (
226
+ await port_client.get_organization_feature_flags()
227
+ )
228
+
222
229
  if (
223
230
  not integration_config.create_port_resources_origin
224
231
  and is_integration_provision_enabled
@@ -236,11 +243,7 @@ async def _initialize_defaults(
236
243
  logger.info(
237
244
  "Resources origin is set to be Port, verifying integration is supported"
238
245
  )
239
- org_feature_flags = await port_client.get_organization_feature_flags()
240
- if (
241
- not is_integration_provision_enabled
242
- or ORG_USE_PROVISIONED_DEFAULTS_FEATURE_FLAG not in org_feature_flags
243
- ):
246
+ if not is_integration_provision_enabled or not has_provision_feature_flag:
244
247
  logger.info(
245
248
  "Port origin for Integration is not supported, changing resources origin to use Ocean"
246
249
  )
@@ -265,6 +268,7 @@ async def _initialize_defaults(
265
268
  port_client,
266
269
  integration_config,
267
270
  defaults.port_app_config if defaults else None,
271
+ has_provision_feature_flag=has_provision_feature_flag,
268
272
  )
269
273
 
270
274
  if (
port_ocean/ocean.py CHANGED
@@ -137,7 +137,7 @@ class Ocean:
137
137
  with open(self.config.oauth_access_token_file_path, "r") as f:
138
138
  return f.read()
139
139
  except Exception:
140
- logger.exception(
140
+ logger.debug(
141
141
  "Failed to load external oauth access token from file",
142
142
  file_path=self.config.oauth_access_token_file_path,
143
143
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.20.1
3
+ Version: 0.20.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
@@ -53,7 +53,7 @@ port_ocean/clients/port/client.py,sha256=OaNeN3U7Hw0tK4jYE6ESJEPKbTf9nGp2jcJVq00
53
53
  port_ocean/clients/port/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  port_ocean/clients/port/mixins/blueprints.py,sha256=POBl4uDocrgJBw4rvCAzwRcD4jk-uBL6pDAuKMTajdg,4633
55
55
  port_ocean/clients/port/mixins/entities.py,sha256=PJzVZTBW_OheFRGPRCZ6yPbVGEAKsMO9CNDNJUI1l48,10770
56
- port_ocean/clients/port/mixins/integrations.py,sha256=qvUnW-n8PqAVOTO7FZpof-724CUK4SK-UQoigxuHetU,9526
56
+ port_ocean/clients/port/mixins/integrations.py,sha256=nqz1gvQnR6Nzv62ZfbXEyli7FTKW5DCFpI1x1KoJJ_E,9341
57
57
  port_ocean/clients/port/mixins/migrations.py,sha256=A6896oJF6WbFL2WroyTkMzr12yhVyWqGoq9dtLNSKBY,1457
58
58
  port_ocean/clients/port/mixins/organization.py,sha256=fCo_ZS8UlQXsyIx-odTuWkbnfcYmVnQfIsSyJuPOPjM,1031
59
59
  port_ocean/clients/port/retry_transport.py,sha256=PtIZOAZ6V-ncpVysRUsPOgt8Sf01QLnTKB5YeKBxkJk,1861
@@ -73,7 +73,7 @@ port_ocean/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  port_ocean/core/defaults/__init__.py,sha256=8qCZg8n06WAdMu9s_FiRtDYLGPGHbOuS60vapeUoAks,142
74
74
  port_ocean/core/defaults/clean.py,sha256=_rL-NCl6Q_x3lUxDW5ACOM27IYilTCWl6ISUfRleuL0,2891
75
75
  port_ocean/core/defaults/common.py,sha256=zJsj7jvlqIMLGXhdASUlbKS8GIAf-FDKKB0O7jB6nx0,4166
76
- port_ocean/core/defaults/initialize.py,sha256=3Ezn63YwxVnByegRPqNXt057Tx9D0IxqrZQHgkrbKWA,10760
76
+ port_ocean/core/defaults/initialize.py,sha256=8BYtPTRj6UGAwP15VBzdRzhtrJOUi88gumrXBX2aG0k,10948
77
77
  port_ocean/core/event_listener/__init__.py,sha256=T3E52MKs79fNEW381p7zU9F2vOMvIiiTYWlqRUqnsg0,1135
78
78
  port_ocean/core/event_listener/base.py,sha256=VdIdp7RLOSxH3ICyV-wCD3NiJoUzsh2KkJ0a9B29GeI,2847
79
79
  port_ocean/core/event_listener/factory.py,sha256=M4Qi05pI840sjDIbdjUEgYe9Gp5ckoCkX-KgLBxUpZg,4096
@@ -137,7 +137,7 @@ port_ocean/log/handlers.py,sha256=ncVjgqrZRh6BhyRrA6DQG86Wsbxph1yWYuEC0cWfe-Q,36
137
137
  port_ocean/log/logger_setup.py,sha256=CoEDowe5OwNOL_5clU6Z4faktfh0VWaOTS0VLmyhHjw,2404
138
138
  port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
139
139
  port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
140
- port_ocean/ocean.py,sha256=qOaTxwQsY_t8rilOAWR2Gl6IWlmbW8QCMHmj8YKWM-Q,6717
140
+ port_ocean/ocean.py,sha256=WmZpcuA5odVMLLVAC2XaTt1nez5zyubzWWismA5JAuo,6713
141
141
  port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
142
  port_ocean/run.py,sha256=COoRSmLG4hbsjIW5DzhV0NYVegI9xHd1POv6sg4U1No,2217
143
143
  port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
@@ -184,8 +184,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
184
184
  port_ocean/utils/signal.py,sha256=mMVq-1Ab5YpNiqN4PkiyTGlV_G0wkUDMMjTZp5z3pb0,1514
185
185
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
186
186
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
187
- port_ocean-0.20.1.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
188
- port_ocean-0.20.1.dist-info/METADATA,sha256=uk3Ox7V4NI3zG4nzt9MSS-mIIAGWAHo6XRDs7lfHpRk,6669
189
- port_ocean-0.20.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
190
- port_ocean-0.20.1.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
191
- port_ocean-0.20.1.dist-info/RECORD,,
187
+ port_ocean-0.20.3.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
188
+ port_ocean-0.20.3.dist-info/METADATA,sha256=etjLtg8n350AlzlWET_M8HSbFlYiDwx2mb9vYIbihJk,6669
189
+ port_ocean-0.20.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
190
+ port_ocean-0.20.3.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
191
+ port_ocean-0.20.3.dist-info/RECORD,,