From 1b2a7902b3ede0941b9e0ecfa87c3150bbf5462b Mon Sep 17 00:00:00 2001 From: Yair Siman Tov <63305203+yairsimantov20@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:29:53 +0200 Subject: [PATCH] Port 5583 ocean search entities routes stop returning entities after upgrading the integration (#264) * Fixed the incorrect search of entities by datasource, which was causing entities from older versions not to be deleted. * Fixed the incorrect search of entities by datasource, which was causing entities from older versions not to be deleted. * Fixed the incorrect search of entities by datasource, which was causing entities from older versions not to be deleted. * reverted agent change --- CHANGELOG.md | 8 ++++++++ port_ocean/clients/port/mixins/entities.py | 9 +++++++-- pyproject.toml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 789d278d95..6fa2607859 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.4.8 (2023-12-13) + + +### Bug Fixes + +- Fixed the incorrect search of entities by datasource, which was causing entities from older versions not to be deleted. (PORT-5583) + + ## 0.4.7 (2023-12-05) diff --git a/port_ocean/clients/port/mixins/entities.py b/port_ocean/clients/port/mixins/entities.py index 5e80755288..4e01f047dc 100644 --- a/port_ocean/clients/port/mixins/entities.py +++ b/port_ocean/clients/port/mixins/entities.py @@ -99,8 +99,13 @@ async def search_entities(self, user_agent_type: UserAgentType) -> list[Entity]: "rules": [ { "property": "$datasource", - "operator": "=", - "value": self.auth.user_agent(user_agent_type), + "operator": "contains", + "value": f"port-ocean/{self.auth.integration_type}/", + }, + { + "property": "$datasource", + "operator": "contains", + "value": f"/{self.auth.integration_identifier}/{user_agent_type.value}", }, ], } diff --git a/pyproject.toml b/pyproject.toml index 05f4b8554c..a067a0921d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.4.7" +version = "0.4.8" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"