Skip to content

Commit 6a62d81

Browse files
authored
[Core] Fixed query to make the search easier on port's side - second improvement (#1341)
# Description What - improvements to reduce port's load Why - to make the query easier for port How - fixed the identifier rule to be one ## Type of change Please leave one option from the following and delete the rest: - [ ] Bug fix (non-breaking change which fixes an issue) <h4> All tests should be run against the port production environment(using a testing org). </h4> ### Core testing checklist - [ ] Integration able to create all default resources from scratch - [ ] Resync finishes successfully - [ ] Resync able to create entities - [ ] Resync able to update entities - [ ] Resync able to detect and delete entities - [ ] Scheduled resync able to abort existing resync and start a new one - [ ] Tested with at least 2 integrations from scratch - [ ] Tested with Kafka and Polling event listeners - [ ] Tested deletion of entities that don't pass the selector
1 parent eaa8f73 commit 6a62d81

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
<!-- towncrier release notes start -->
9+
## 0.18.2 (2025-01-21)
10+
11+
### Improvements
12+
13+
- Updated the search entitites query sent to port with one rule of identifier instead of many
14+
915
## 0.18.1 (2025-01-21)
1016

1117
### Improvements

port_ocean/core/integrations/mixins/sync_raw.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,14 @@ def _construct_search_query_for_entities(self, entities: list[Entity]) -> dict:
143143
"combinator": "and",
144144
"rules": [
145145
{
146-
"combinator": "or",
147-
"rules": [
148-
{
149-
"property": "$identifier",
150-
"operator": "in",
151-
"value": [entity.identifier for entity in entities],
152-
},
153-
{
154-
"property": "$blueprint",
155-
"operator": "=",
156-
"value": entities[0].blueprint,
157-
}
158-
]
146+
"property": "$identifier",
147+
"operator": "in",
148+
"value": [entity.identifier for entity in entities]
149+
},
150+
{
151+
"property": "$blueprint",
152+
"operator": "=",
153+
"value": entities[0].blueprint
159154
}
160155
]
161156
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "port-ocean"
3-
version = "0.18.1"
3+
version = "0.18.2"
44
description = "Port Ocean is a CLI tool for managing your Port projects."
55
readme = "README.md"
66
homepage = "https://app.getport.io"

0 commit comments

Comments
 (0)