port-ocean 0.24.14__py3-none-any.whl → 0.24.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,10 @@ RUN poetry install --without dev --no-root --no-interaction --no-ansi --no-cache
19
19
 
20
20
  FROM ${BASE_RUNNER_PYTHON_IMAGE} AS prod
21
21
 
22
+ RUN groupadd -r appgroup && useradd -r -g appgroup -m ocean
23
+
24
+ RUN mkdir -p /tmp/ocean
25
+
22
26
  ARG INTEGRATION_VERSION
23
27
  ARG BUILD_CONTEXT
24
28
  ARG PROMETHEUS_MULTIPROC_DIR=/tmp/ocean/prometheus/metrics
@@ -27,6 +31,7 @@ ENV LIBRDKAFKA_VERSION=2.8.2 \
27
31
  PROMETHEUS_MULTIPROC_DIR=${PROMETHEUS_MULTIPROC_DIR}
28
32
 
29
33
  RUN mkdir -p ${PROMETHEUS_MULTIPROC_DIR}
34
+ RUN chown -R ocean:appgroup /tmp/ocean && chmod -R 755 /tmp/ocean
30
35
 
31
36
  RUN apt-get update \
32
37
  && apt-get install -y \
@@ -43,6 +48,8 @@ ENV PIP_ROOT_USER_ACTION=ignore
43
48
 
44
49
  WORKDIR /app
45
50
 
51
+ USER ocean
52
+
46
53
  # Copy the application code
47
54
  COPY ./${BUILD_CONTEXT} /app
48
55
 
@@ -51,10 +58,13 @@ COPY --from=base /app/.venv /app/.venv
51
58
 
52
59
  COPY ./integrations/_infra/init.sh /app/init.sh
53
60
 
61
+ USER root
54
62
  # Ensure that ocean is available for all in path
55
63
  RUN chmod a+x /app/.venv/bin/ocean
56
64
 
57
65
  RUN chmod a+x /app/init.sh
58
66
  RUN ln -s /app/.venv/bin/ocean /usr/bin/ocean
67
+
68
+ USER ocean
59
69
  # Run the application
60
70
  CMD ["bash", "/app/init.sh"]
@@ -2,6 +2,11 @@ ARG BASE_PYTHON_IMAGE=debian:trixie-slim
2
2
  # debian:trixie-slim - Python 3.12
3
3
  FROM ${BASE_PYTHON_IMAGE}
4
4
 
5
+ RUN groupadd -r appgroup && useradd -r -g appgroup -m ocean
6
+
7
+ RUN mkdir -p /tmp/ocean && chown -R ocean:appgroup /tmp/ocean && chmod -R 755 /tmp/ocean
8
+
9
+
5
10
  RUN apt-get update \
6
11
  && apt-get install -y --no-install-recommends librdkafka-dev python3 \
7
12
  && apt-get clean
@@ -29,9 +34,13 @@ ARG PROMETHEUS_MULTIPROC_DIR=/tmp/ocean/prometheus/metrics
29
34
 
30
35
  ENV PROMETHEUS_MULTIPROC_DIR=${PROMETHEUS_MULTIPROC_DIR}
31
36
 
37
+ # Create /tmp/ocean directory and set permissions
38
+
39
+
32
40
  RUN mkdir -p ${PROMETHEUS_MULTIPROC_DIR}
33
41
 
34
42
  WORKDIR /app
43
+ USER ocean
35
44
 
36
45
  COPY . .
37
46
  RUN rm -rf .venv-docker ${BUILD_CONTEXT}/.venv-docker
@@ -325,7 +325,11 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
325
325
  )
326
326
 
327
327
  passed_entities = []
328
+ number_of_raw_results = 0
329
+ number_of_transformed_entities = 0
330
+
328
331
  if raw_results:
332
+ number_of_raw_results += len(raw_results)
329
333
  calculation_result = await self._register_resource_raw(
330
334
  resource_config,
331
335
  raw_results,
@@ -334,12 +338,13 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
334
338
  )
335
339
  errors.extend(calculation_result.errors)
336
340
  passed_entities = list(calculation_result.entity_selector_diff.passed)
341
+ number_of_transformed_entities += calculation_result.number_of_transformed_entities
337
342
  logger.info(
338
343
  f"Finished registering change for {len(raw_results)} raw results for kind: {resource_config.kind}. {len(passed_entities)} entities were affected"
339
344
  )
340
345
 
341
- number_of_raw_results = 0
342
- number_of_transformed_entities = 0
346
+
347
+
343
348
  for generator in async_generators:
344
349
  try:
345
350
  async for items in generator:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.24.14
3
+ Version: 0.24.16
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -1,9 +1,9 @@
1
- integrations/_infra/Dockerfile.Deb,sha256=5mSAOr1TaqkfFPTKkB9q9BYIHi4kaR8imfBwJVZuP1M,1679
1
+ integrations/_infra/Dockerfile.Deb,sha256=17iumXYs0jwW8oaLfRFZe35NI9fUKUaUI62zuVzDrHM,1865
2
2
  integrations/_infra/Dockerfile.alpine,sha256=7E4Sb-8supsCcseerHwTkuzjHZoYcaHIyxiBZ-wewo0,3482
3
3
  integrations/_infra/Dockerfile.base.builder,sha256=ESe1PKC6itp_AuXawbLI75k1Kruny6NTANaTinxOgVs,743
4
4
  integrations/_infra/Dockerfile.base.runner,sha256=uAcs2IsxrAAUHGXt_qULA5INr-HFguf5a5fCKiqEzbY,384
5
5
  integrations/_infra/Dockerfile.dockerignore,sha256=CM1Fxt3I2AvSvObuUZRmy5BNLSGC7ylnbpWzFgD4cso,1163
6
- integrations/_infra/Dockerfile.local,sha256=4M5wyksRcGQ0WSXfDcJsHshE8uUSQw5yf6O3JK_DyK4,1035
6
+ integrations/_infra/Dockerfile.local,sha256=WmZqwzrxlrQtKrqcGf2vzbVCx3XzISyrwxCuOa4FT28,1250
7
7
  integrations/_infra/Makefile,sha256=YgLKvuF_Dw4IA7X98Nus6zIW_3cJ60M1QFGs3imj5c4,2430
8
8
  integrations/_infra/entry_local.sh,sha256=GIuAXACcYv4DDxH6ubDidNJboqmAJYW4OanUK_VW4nQ,547
9
9
  integrations/_infra/grpcio.sh,sha256=m924poYznoRZ6Tt7Ct8Cs5AV_cmmOx598yIZ3z4DvZE,616
@@ -121,7 +121,7 @@ port_ocean/core/integrations/mixins/events.py,sha256=2L7P3Jhp8XBqddh2_o9Cn4N261n
121
121
  port_ocean/core/integrations/mixins/handler.py,sha256=mZ7-0UlG3LcrwJttFbMe-R4xcOU2H_g33tZar7PwTv8,3771
122
122
  port_ocean/core/integrations/mixins/live_events.py,sha256=zM24dhNc7uHx9XYZ6toVhDADPA90EnpOmZxgDegFZbA,4196
123
123
  port_ocean/core/integrations/mixins/sync.py,sha256=Vm_898pLKBwfVewtwouDWsXoxcOLicnAy6pzyqqk6U8,4053
124
- port_ocean/core/integrations/mixins/sync_raw.py,sha256=AtS0Qr4mIY3vZZxSmnFOLMskiQ_kJUg0_f2ZT8O_Ejw,33670
124
+ port_ocean/core/integrations/mixins/sync_raw.py,sha256=0wFpyWSlKREIb3BNfkUg1Tj6ueivsig2YjPmYchb-mY,33823
125
125
  port_ocean/core/integrations/mixins/utils.py,sha256=N76dNu1Y6UEg0_pcSdF4RO6dQIZ8EBfX3xMelgWdMxM,3779
126
126
  port_ocean/core/models.py,sha256=DNbKpStMINI2lIekKprTqBevqkw_wFuFayN19w1aDfQ,2893
127
127
  port_ocean/core/ocean_types.py,sha256=4VipWFOHEh_d9LmWewQccwx1p2dtrRYW0YURVgNsAjo,1398
@@ -200,8 +200,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
200
200
  port_ocean/utils/signal.py,sha256=mMVq-1Ab5YpNiqN4PkiyTGlV_G0wkUDMMjTZp5z3pb0,1514
201
201
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
202
202
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
203
- port_ocean-0.24.14.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
204
- port_ocean-0.24.14.dist-info/METADATA,sha256=BVsTGNvXk57-A3isNjhXmFlg9tb9-vRO56oB-i5wPDM,6856
205
- port_ocean-0.24.14.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
206
- port_ocean-0.24.14.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
207
- port_ocean-0.24.14.dist-info/RECORD,,
203
+ port_ocean-0.24.16.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
204
+ port_ocean-0.24.16.dist-info/METADATA,sha256=KM33tc1Hz4OpYMIto3ea5Q6Ouz1RTQn_-U37-JB2Xto,6856
205
+ port_ocean-0.24.16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
206
+ port_ocean-0.24.16.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
207
+ port_ocean-0.24.16.dist-info/RECORD,,