diff --git a/CHANGELOG.md b/CHANGELOG.md index 71ec5e9d00..953ab7aae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## 0.15.0 (2024-12-12) + +### Features + +- Added `SaasOauth` runtime support + + ## 0.14.7 (2024-12-09) diff --git a/port_ocean/config/settings.py b/port_ocean/config/settings.py index 37aa108d18..5c948af17d 100644 --- a/port_ocean/config/settings.py +++ b/port_ocean/config/settings.py @@ -103,7 +103,7 @@ def parse_config(model: Type[BaseModel], config: Any) -> BaseModel: @validator("runtime") def validate_runtime(cls, runtime: Runtime) -> Runtime: - if runtime == Runtime.Saas: + if runtime.is_saas_runtime: spec = get_spec_file() if spec is None: raise ValueError( diff --git a/port_ocean/core/models.py b/port_ocean/core/models.py index fb588becda..7604f6a6ed 100644 --- a/port_ocean/core/models.py +++ b/port_ocean/core/models.py @@ -8,8 +8,13 @@ class Runtime(Enum): Saas = "Saas" + SaasOauth = "SaasOauth" OnPrem = "OnPrem" + @property + def is_saas_runtime(self) -> bool: + return self in [Runtime.Saas, Runtime.SaasOauth] + class Entity(BaseModel): identifier: Any diff --git a/port_ocean/ocean.py b/port_ocean/ocean.py index 55a85c39c3..6e9da0516c 100644 --- a/port_ocean/ocean.py +++ b/port_ocean/ocean.py @@ -10,7 +10,6 @@ from starlette.types import Scope, Receive, Send from port_ocean.core.handlers.resync_state_updater import ResyncStateUpdater -from port_ocean.core.models import Runtime from port_ocean.clients.port.client import PortClient from port_ocean.config.settings import ( IntegrationConfiguration, @@ -73,7 +72,7 @@ def __init__( self.app_initialized = False def is_saas(self) -> bool: - return self.config.runtime == Runtime.Saas + return self.config.runtime.is_saas_runtime async def _setup_scheduled_resync( self, diff --git a/pyproject.toml b/pyproject.toml index bb799d82da..1c5ad79ca4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.14.7" +version = "0.15.0" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"