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 6ef0fb3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- towncrier release notes start -->
## 0.20.1 (2025-02-23)

### Bug Fixes

- Validate feature flag for get config in new integrations

## 0.20.0 (2025-02-20)

### Features
Expand Down
25 changes: 18 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,23 @@ 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(
should_raise,
should_log,
)
)
)
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "port-ocean"
version = "0.20.0"
version = "0.20.1"
description = "Port Ocean is a CLI tool for managing your Port projects."
readme = "README.md"
homepage = "https://app.getport.io"
Expand Down

0 comments on commit 6ef0fb3

Please sign in to comment.