Skip to content

Commit 68fbac7

Browse files
ivankalinovskiIvan Kalinovski
andauthored
Port 15181 bug cache not working in ocean (#1823)
### **User description** # Description What - Cache not working Why - No permissions How - Added user to dockerfile ## 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 ### Integration testing checklist - [ ] Integration able to create all default resources from scratch - [ ] Resync able to create entities - [ ] Resync able to update entities - [ ] Resync able to detect and delete entities - [ ] Resync finishes successfully - [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the `examples` folder in the integration directory. - [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved - [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected - [ ] Docs PR link [here](#) ### Preflight checklist - [ ] Handled rate limiting - [ ] Handled pagination - [ ] Implemented the code in async - [ ] Support Multi account ## Screenshots Include screenshots from your environment showing how the resources of the integration will look. ## API Documentation Provide links to the API documentation used for this integration. ___ ### **PR Type** Bug fix ___ ### **Description** - Fix cache directory permissions by moving to `/tmp/ocean` - Update Dockerfile to grant ocean user proper permissions - Bump version to 0.24.17 with changelog updates ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>disk.py</strong><dd><code>Move cache directory to /tmp location</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> port_ocean/cache/disk.py <li>Change default cache directory from <code>.ocean_cache</code> to <br><code>/tmp/ocean/.ocean_cache</code> </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1823/files#diff-8e851efc0926a8ad994a8990ad01345031f0b434717350d5ae4fc4f4469ba0c7">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>Dockerfile.Deb</strong><dd><code>Fix Docker permissions for ocean user</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> integrations/_infra/Dockerfile.Deb <li>Remove premature user switch to ocean<br> <li> Add proper ownership and permissions for ocean user on /app directory<br> <li> Ensure ocean binary is executable for all users </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1823/files#diff-b1c90b5a5de591768958e6775a7392c2f6880a6c72ecbf751f3bfbdf7ec2746c">+2/-3</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 version 0.24.17</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Add version 0.24.17 entry with bug fix details<br> <li> Document cache folder and permissions changes </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1823/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+6/-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.17</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; </dd></summary> <hr> pyproject.toml - Bump version from 0.24.16 to 0.24.17 </details> </td> <td><a href="https://github.com/port-labs/ocean/pull/1823/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: Ivan Kalinovski <ivankalinovski@Ivans-MacBook-Pro.local>
1 parent 6f51710 commit 68fbac7

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
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.24.17 (2025-06-23)
10+
11+
### Bug Fixes
12+
- Update cache folder to be in /tmp.
13+
- Use root user in smoke test.
14+
915
## 0.24.16 (2025-06-22)
1016

1117
### Improvements

port_ocean/cache/disk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DiskCacheProvider(CacheProvider):
2020

2121
def __init__(self, cache_dir: str | None = None) -> None:
2222
if cache_dir is None:
23-
cache_dir = ".ocean_cache"
23+
cache_dir = "/tmp/ocean/.ocean_cache"
2424
self._cache_dir = Path(cache_dir)
2525
self._cache_dir.mkdir(parents=True, exist_ok=True)
2626

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.16"
3+
version = "0.24.17"
44
description = "Port Ocean is a CLI tool for managing your Port projects."
55
readme = "README.md"
66
homepage = "https://app.getport.io"

scripts/run-smoke-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ echo "Found release ${TAR_FILE}, triggering fake integration with ID: '${INTEGRA
3434

3535
# NOTE: Runs the fake integration with the modified blueprints and install the current core for a single sync
3636
docker run --rm -i \
37+
--user root \
3738
--entrypoint 'bash' \
3839
-v "${TAR_FULL_PATH}:/opt/dist/${TAR_FILE}" \
3940
-v "${TEMP_RESOURCES_DIR}:/opt/port-resources" \
@@ -49,7 +50,6 @@ docker run --rm -i \
4950
-e OCEAN__INTEGRATION__CONFIG__THIRD_PARTY_LATENCY_MS="${OCEAN__INTEGRATION__CONFIG__THIRD_PARTY_LATENCY_MS:--1}" \
5051
-e OCEAN__METRICS="${OCEAN__METRICS:--1}" \
5152
-e OCEAN__RUNTIME_MODE="${OCEAN__RUNTIME_MODE:-single_process}" \
52-
-e PROMETHEUS_MULTIPROC_DIR="/tmp" \
5353
-e OCEAN__RESOURCES_PATH="/opt/port-resources" \
5454
-e APPLICATION__LOG_LEVEL="DEBUG" \
5555
--name=ZOMG-TEST \

0 commit comments

Comments
 (0)