diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ab382660a..9e0a059e91 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.9.11 (2024-08-05) + + +### Bug Fixes + +- Not showing misleading error message if port state is empty + ## 0.9.10 (2024-08-04) diff --git a/port_ocean/core/integrations/mixins/sync_raw.py b/port_ocean/core/integrations/mixins/sync_raw.py index bce005dac3..e71dc61fe4 100644 --- a/port_ocean/core/integrations/mixins/sync_raw.py +++ b/port_ocean/core/integrations/mixins/sync_raw.py @@ -418,6 +418,7 @@ async def sync_raw_all( ) logger.info(f"Resync will use the following mappings: {app_config.dict()}") try: + did_fetched_current_state = True entities_at_port = await ocean.port_client.search_entities( user_agent_type ) @@ -429,7 +430,7 @@ async def sync_raw_all( f"Response status code: {e.response.status_code if isinstance(e, httpx.HTTPStatusError) else None}\n" f"Response content: {e.response.text if isinstance(e, httpx.HTTPStatusError) else None}\n" ) - entities_at_port = [] + did_fetched_current_state = False creation_results: list[tuple[list[Entity], list[Exception]]] = [] @@ -448,7 +449,7 @@ async def sync_raw_all( except asyncio.CancelledError as e: logger.warning("Resync aborted successfully") else: - if not entities_at_port: + if not did_fetched_current_state: logger.warning( "Due to an error before the resync, the previous state of entities at Port is unknown." " Skipping delete phase due to unknown initial state." diff --git a/pyproject.toml b/pyproject.toml index d8aac50e30..a28c43ebf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.9.10" +version = "0.9.11" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"