Skip to content

Commit 237341a

Browse files
[Core] Port 14266 ocean to use new bulk inserts route (#1728)
### **User description** # Description What - release bulk upserts for ocean saas Why - to use the new optimized bulk route How - change the condition for when to use the bulk route ## Type of change Please leave one option from the following and delete the rest: - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] New Integration (non-breaking change which adds a new integration) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Non-breaking change (fix of existing functionality that will not change current behavior) - [ ] Documentation (added/updated documentation) <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 ___ ### **PR Type** Enhancement ___ ### **Description** - Enable Port bulk upserts API for Ocean SaaS resyncs - Update version to 0.24.1 and document change in changelog ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>entities.py</strong><dd><code>Enable bulk upserts for Ocean SaaS environments</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> port_ocean/clients/port/mixins/entities.py <li>Switch bulk upserts condition to use SaaS check (<code>ocean.app.is_saas()</code>)<br> <li> Bulk upserts now enabled for Ocean SaaS environments </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1728/files#diff-1cd3dc7778947127c84baab24278808bee9c4ded96b1c320e28ece0f4d55ba7f">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Add changelog entry for bulk upserts in SaaS</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Add entry for version 0.24.1<br> <li> Document use of Port bulk upserts API in Ocean SaaS </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1728/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+5/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>pyproject.toml</strong><dd><code>Bump version to 0.24.1</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> pyproject.toml - Bump version from 0.24.0 to 0.24.1 </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1728/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about Qodo Merge usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --------- Co-authored-by: Tom Tankilevitch <59158507+Tankilevitch@users.noreply.github.com>
1 parent 6095a2a commit 237341a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
77

88
<!-- towncrier release notes start -->
99

10+
## 0.24.1 (2025-06-03)
11+
12+
### Improvements
13+
- Using Port bulk upserts api in resyncs in Ocean SaaS
14+
1015
## 0.24.0 (2025-06-03)
1116

1217
### Improvements

port_ocean/clients/port/mixins/entities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async def upsert_entities_in_batches(
353353
entities_results: list[tuple[bool, Entity]] = []
354354
blueprint = entities[0].blueprint
355355

356-
if ocean.config.bulk_upserts_enabled:
356+
if ocean.app.is_saas():
357357
bulk_size = self.calculate_entities_batch_size(entities)
358358
bulks = [
359359
entities[i : i + bulk_size] for i in range(0, len(entities), bulk_size)

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.24.0"
3+
version = "0.24.1"
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)