Skip to content

Commit

Permalink
[Core] Validate feature flag for get config in new integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzaadi committed Feb 23, 2025
1 parent 46f8b07 commit df50730
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions port_ocean/clients/port/mixins/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from port_ocean.core.handlers.port_app_config.models import PortAppConfig


ORG_USE_PROVISIONED_DEFAULTS_FEATURE_FLAG = "USE_PROVISIONED_DEFAULTS"
INTEGRATION_POLLING_INTERVAL_INITIAL_SECONDS = 3
INTEGRATION_POLLING_INTERVAL_BACKOFF_FACTOR = 1.55
INTEGRATION_POLLING_RETRY_LIMIT = 30
Expand Down Expand Up @@ -75,13 +76,18 @@ async def get_current_integration(
integration = response.json().get("integration", {})
if integration.get("config", None) or not integration:
return integration
is_provision_enabled_for_integration = integration.get(
"installationAppType", None
) and (
await self.is_integration_provision_enabled(
integration.get("installationAppType", ""),
should_raise,
should_log,
is_provision_enabled_for_integration = (
integration.get("installationAppType", None)
and (
await self.is_integration_provision_enabled(
integration.get("installationAppType", ""),
should_raise,
should_log,
)
)
and (
ORG_USE_PROVISIONED_DEFAULTS_FEATURE_FLAG
in (await self.client.get_organization_feature_flags())
)
)

Expand Down

0 comments on commit df50730

Please sign in to comment.