From 833df49285b485829936eee59cc4b97f18140ee0 Mon Sep 17 00:00:00 2001 From: Yair Siman Tov <63305203+yairsimantov20@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:59:47 +0300 Subject: [PATCH] Pydantic fail cli (#915) # Description What - The ocean cli is failing in any folder that dont contain a pyproject.toml folder Why - The cli imports is causing one of the ocean setting models to check for the pyproject.toml file on the init How - initiating the problematic model with default factory instead ## Type of change - [X] Bug fix (non-breaking change which fixes an issue) --- CHANGELOG.md | 8 ++++++++ port_ocean/config/settings.py | 4 +++- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fbbd5310f..5926a9c8af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## 0.9.14 (2024-08-19) + + +### Bug Fixes + +- Fixed an issue causing the cli to fail in a directory with no pyproject.toml in it + + ## 0.9.13 (2024-08-13) ### Improvements diff --git a/port_ocean/config/settings.py b/port_ocean/config/settings.py index 4180d88397..1955ed7364 100644 --- a/port_ocean/config/settings.py +++ b/port_ocean/config/settings.py @@ -73,7 +73,9 @@ class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow): port: PortSettings event_listener: EventListenerSettingsType # If an identifier or type is not provided, it will be generated based on the integration name - integration: IntegrationSettings = IntegrationSettings(type="", identifier="") + integration: IntegrationSettings = Field( + default_factory=lambda: IntegrationSettings(type="", identifier="") + ) runtime: Runtime = "OnPrem" @root_validator() diff --git a/pyproject.toml b/pyproject.toml index f85efe720d..65c348740c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.9.13" +version = "0.9.14" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"