port-ocean 0.24.22__tar.gz → 0.25.2__tar.gz
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.
- {port_ocean-0.24.22 → port_ocean-0.25.2}/PKG-INFO +1 -1
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.Deb +5 -2
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.local +10 -3
- port_ocean-0.25.2/integrations/_infra/README.md +30 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/entry_local.sh +2 -1
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py +7 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +62 -21
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/sync_raw.py +307 -117
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/ocean_types.py +1 -1
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py +22 -13
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/mixins/test_live_events.py +2 -2
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/mixins/test_sync_raw.py +8 -8
- {port_ocean-0.24.22 → port_ocean-0.25.2}/pyproject.toml +1 -1
- {port_ocean-0.24.22 → port_ocean-0.25.2}/LICENSE.md +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/README.md +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.alpine +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.base.builder +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.base.runner +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Dockerfile.dockerignore +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/Makefile +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/grpcio.sh +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/integrations/_infra/init.sh +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/bootstrap.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cache/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cache/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cache/disk.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cache/errors.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cache/memory.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cli.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/defaults/__init___.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/defaults/clean.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/defaults/dock.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/defaults/group.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/list_integrations.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/main.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/new.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/pull.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/sail.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/commands/version.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/cookiecutter.json +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/extensions.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/hooks/post_gen_project.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.env.example +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/blueprints.json +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/port-app-config.yml +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CHANGELOG.md +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CONTRIBUTING.md +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/README.md +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitignore +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/sonar-project.properties +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/test_sample.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/cli/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/auth/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/auth/auth_client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/auth/oauth_client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/authentication.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/blueprints.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/entities.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/integrations.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/migrations.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/mixins/organization.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/retry_transport.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/types.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/clients/port/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/config/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/config/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/config/dynamic.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/config/settings.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/consumers/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/consumers/kafka_consumer.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/context/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/context/event.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/context/metric_resource.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/context/ocean.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/context/resource.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/defaults/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/defaults/clean.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/defaults/common.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/defaults/initialize.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/factory.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/http.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/kafka.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/once.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/polling.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/event_listener/webhooks_only.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/port/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/port/applier.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entity_processor/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/entity_processor/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/port_app_config/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/port_app_config/api.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/port_app_config/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/port_app_config/models.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/queue/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/queue/abstract_queue.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/queue/local_queue.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/resync_state_updater/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/resync_state_updater/updater.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/webhook/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/webhook/abstract_webhook_processor.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/webhook/processor_manager.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/handlers/webhook/webhook_event.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/events.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/handler.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/live_events.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/sync.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/integrations/mixins/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/models.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/utils/entity_topological_sorter.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/core/utils/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/debug_cli.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/api.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/clients.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/context.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/core.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/port_defaults.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/exceptions/webhook_processor.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/helpers/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/helpers/async_client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/helpers/metric/metric.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/helpers/metric/utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/helpers/retry.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/log/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/log/handlers.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/log/logger_setup.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/log/sensetive.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/middlewares.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/ocean.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/py.typed +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/run.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/sonar-project.properties +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/cache/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/cache/test_disk_cache.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/cache/test_memory_cache.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/oauth/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/oauth/test_oauth_client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/port/mixins/test_entities.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/port/mixins/test_integrations.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/clients/port/mixins/test_organization_mixin.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/config/test_config.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/conftest.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/conftest.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/defaults/test_common.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/entities_state_applier/test_applier.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/port_app_config/test_api.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/port_app_config/test_base.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/queue/test_local_queue.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/webhook/test_abstract_webhook_processor.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/webhook/test_processor_manager.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/handlers/webhook/test_webhook_event.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/test_utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/utils/test_entity_topological_sorter.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/core/utils/test_resolve_entities_diff.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/fake_port_api.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/fixtures.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/integration.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/ocean_app.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/port_client.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/helpers/smoke_test.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/log/test_handlers.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/test_metric.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/test_ocean.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/test_smoke.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/utils/test_async_iterators.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/tests/utils/test_cache.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/__init__.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/async_http.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/async_iterators.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/cache.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/ipc.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/misc.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/queue_utils.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/repeat.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/signal.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/utils/time.py +0 -0
- {port_ocean-0.24.22 → port_ocean-0.25.2}/port_ocean/version.py +0 -0
@@ -3,6 +3,7 @@ ARG BASE_RUNNER_PYTHON_IMAGE=ghcr.io/port-labs/port-ocean-base-runner:latest
|
|
3
3
|
|
4
4
|
FROM ${BASE_BUILDER_PYTHON_IMAGE} AS base
|
5
5
|
|
6
|
+
ARG OCEAN_USER_ID=999
|
6
7
|
ARG BUILD_CONTEXT
|
7
8
|
ARG BUILDPLATFORM
|
8
9
|
|
@@ -19,7 +20,7 @@ RUN poetry install --without dev --no-root --no-interaction --no-ansi --no-cache
|
|
19
20
|
|
20
21
|
FROM ${BASE_RUNNER_PYTHON_IMAGE} AS prod
|
21
22
|
|
22
|
-
RUN groupadd -r appgroup && useradd -r -g appgroup -m ocean
|
23
|
+
RUN groupadd -r appgroup && useradd -r -g appgroup -m -u ${OCEAN_USER_ID} ocean
|
23
24
|
|
24
25
|
RUN mkdir -p /tmp/ocean
|
25
26
|
|
@@ -38,6 +39,7 @@ RUN apt-get update \
|
|
38
39
|
ca-certificates \
|
39
40
|
openssl \
|
40
41
|
curl \
|
42
|
+
acl \
|
41
43
|
&& apt-get clean
|
42
44
|
|
43
45
|
LABEL INTEGRATION_VERSION=${INTEGRATION_VERSION}
|
@@ -64,7 +66,8 @@ RUN chmod a+x /app/.venv/bin/ocean
|
|
64
66
|
|
65
67
|
RUN chmod a+x /app/init.sh
|
66
68
|
RUN ln -s /app/.venv/bin/ocean /usr/bin/ocean
|
67
|
-
|
69
|
+
# Add ocean user to ssl certs group
|
70
|
+
RUN setfacl -m u:ocean:rwX /etc/ssl/certs
|
68
71
|
USER ocean
|
69
72
|
# Run the application
|
70
73
|
CMD ["bash", "/app/init.sh"]
|
@@ -2,9 +2,10 @@ ARG BASE_PYTHON_IMAGE=debian:trixie-slim
|
|
2
2
|
# debian:trixie-slim - Python 3.12
|
3
3
|
FROM ${BASE_PYTHON_IMAGE}
|
4
4
|
|
5
|
-
|
5
|
+
ARG OCEAN_USER_ID=999
|
6
|
+
RUN groupadd -r appgroup && useradd -r -g appgroup -m -u ${OCEAN_USER_ID} ocean
|
6
7
|
|
7
|
-
RUN mkdir -p /tmp/ocean
|
8
|
+
RUN mkdir -p /tmp/ocean
|
8
9
|
|
9
10
|
|
10
11
|
RUN apt-get update \
|
@@ -27,6 +28,7 @@ RUN apt-get update \
|
|
27
28
|
build-essential\
|
28
29
|
git \
|
29
30
|
python3-venv \
|
31
|
+
acl \
|
30
32
|
&& apt-get clean
|
31
33
|
|
32
34
|
ARG BUILD_CONTEXT
|
@@ -40,7 +42,6 @@ ENV PROMETHEUS_MULTIPROC_DIR=${PROMETHEUS_MULTIPROC_DIR}
|
|
40
42
|
RUN mkdir -p ${PROMETHEUS_MULTIPROC_DIR}
|
41
43
|
|
42
44
|
WORKDIR /app
|
43
|
-
USER ocean
|
44
45
|
|
45
46
|
COPY . .
|
46
47
|
RUN rm -rf .venv-docker ${BUILD_CONTEXT}/.venv-docker
|
@@ -51,5 +52,11 @@ RUN python3 -m venv ${BUILD_CONTEXT}/.venv-docker
|
|
51
52
|
WORKDIR /app/${BUILD_CONTEXT}
|
52
53
|
|
53
54
|
WORKDIR /app
|
55
|
+
RUN chown -R ocean:appgroup /app && chmod -R 755 /app
|
56
|
+
RUN chown -R ocean:appgroup /app/${BUILD_CONTEXT} && chmod -R 755 /app/${BUILD_CONTEXT}
|
57
|
+
RUN chown -R ocean:appgroup /tmp/ocean && chmod -R 755 /tmp/ocean
|
58
|
+
# Add ocean user to ssl certs group
|
59
|
+
RUN setfacl -m u:ocean:rwX /etc/ssl/certs
|
60
|
+
USER ocean
|
54
61
|
|
55
62
|
ENTRYPOINT ["./integrations/_infra/entry_local.sh"]
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Running the Ocean image locally using vscode / Cursor
|
2
|
+
|
3
|
+
In order to run the local image of Ocean you need to follow these steps:
|
4
|
+
|
5
|
+
1. Build the image:
|
6
|
+
|
7
|
+
```bash
|
8
|
+
docker build -f integrations/_infra/Dockerfile.local --build-arg BUILD_CONTEXT=integrations/<integration_type> --platform linux/arm64 -t <my-local-image>:<local> .
|
9
|
+
```
|
10
|
+
|
11
|
+
2. Run the image
|
12
|
+
1. `5678` is the debugpy port mentioned in the `entry_local.sh` file
|
13
|
+
2. `8000` is the port of the Ocean FastAPI server
|
14
|
+
3. the `-v` option mounts your local Ocean directory to the pod, allowing you not to constantly build the image.
|
15
|
+
1. Make sure to run the command from the root directory of the Ocean repository.
|
16
|
+
|
17
|
+
```bash
|
18
|
+
docker run --rm -it \
|
19
|
+
-v $(pwd):/app \
|
20
|
+
-p 5678:5678 \
|
21
|
+
-p 8000:8000 \
|
22
|
+
-e BUILD_CONTEXT=integrations/<integration_type> \
|
23
|
+
-e OCEAN__PORT__CLIENT_ID=<MY_CLIENT_ID> \
|
24
|
+
-e OCEAN__PORT__CLIENT_SECRET=<MY_CLIENT_SECRET> \
|
25
|
+
-e OCEAN__PORT__MY_OTHER_CONFIGURATION=<MY_OTHER_CONFIGURATION> \
|
26
|
+
<my-local-image>:<local>
|
27
|
+
```
|
28
|
+
|
29
|
+
3. In vscode/Cursor, run the `Attach to docker fake-integration integration` Running configuration from the `launch.json`.
|
30
|
+
4. Have fun debugging!
|
@@ -2,6 +2,8 @@ import asyncio
|
|
2
2
|
from collections import defaultdict
|
3
3
|
from itertools import groupby
|
4
4
|
|
5
|
+
from loguru import logger
|
6
|
+
|
5
7
|
from port_ocean.clients.port.client import PortClient
|
6
8
|
from port_ocean.core.models import Entity
|
7
9
|
|
@@ -37,6 +39,11 @@ async def get_related_entities(
|
|
37
39
|
blueprints_to_relations = defaultdict(list)
|
38
40
|
for entity, blueprint in entity_to_blueprint:
|
39
41
|
for relation_name, relation in entity.relations.items():
|
42
|
+
if relation_name not in blueprint.relations:
|
43
|
+
logger.warning(
|
44
|
+
f"Relation {relation_name} found in entity {entity.identifier} but not in blueprint {blueprint.identifier}"
|
45
|
+
)
|
46
|
+
continue
|
40
47
|
relation_blueprint = blueprint.relations[relation_name].target
|
41
48
|
blueprints_to_relations[relation_blueprint].extend(
|
42
49
|
relation if isinstance(relation, list) else [relation]
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import asyncio
|
2
2
|
from asyncio import Task
|
3
3
|
from dataclasses import dataclass, field
|
4
|
+
|
4
5
|
from functools import lru_cache
|
5
6
|
from typing import Any, Optional
|
6
7
|
import jq # type: ignore
|
@@ -23,6 +24,49 @@ from port_ocean.exceptions.core import EntityProcessorException
|
|
23
24
|
from port_ocean.utils.queue_utils import process_in_queue
|
24
25
|
|
25
26
|
|
27
|
+
class ExampleStates:
|
28
|
+
__succeed: list[dict[str, Any]]
|
29
|
+
__errors: list[dict[str, Any]]
|
30
|
+
__max_size: int
|
31
|
+
|
32
|
+
def __init__(self, max_size: int = 0) -> None:
|
33
|
+
"""
|
34
|
+
Store two sequences:
|
35
|
+
- succeed: items that succeeded
|
36
|
+
- errors: items that failed
|
37
|
+
"""
|
38
|
+
self.__succeed = []
|
39
|
+
self.__errors = []
|
40
|
+
self.__max_size = max_size
|
41
|
+
|
42
|
+
def add_example(self, succeed: bool, item: dict[str, Any]) -> None:
|
43
|
+
if succeed:
|
44
|
+
self.__succeed.append(item)
|
45
|
+
else:
|
46
|
+
self.__errors.append(item)
|
47
|
+
|
48
|
+
def __len__(self) -> int:
|
49
|
+
"""
|
50
|
+
Total number of items (successes + errors).
|
51
|
+
"""
|
52
|
+
return len(self.__succeed) + len(self.__errors)
|
53
|
+
|
54
|
+
def get_examples(self, number: int = 0) -> list[dict[str, Any]]:
|
55
|
+
"""
|
56
|
+
Return a list of up to number items, taking successes first,
|
57
|
+
"""
|
58
|
+
if number <= 0:
|
59
|
+
number = self.__max_size
|
60
|
+
# how many from succeed?
|
61
|
+
s_count = min(number, len(self.__succeed))
|
62
|
+
result = list(self.__succeed[:s_count])
|
63
|
+
# how many more from errors?
|
64
|
+
e_count = number - s_count
|
65
|
+
if e_count > 0:
|
66
|
+
result.extend(self.__errors[:e_count])
|
67
|
+
return result
|
68
|
+
|
69
|
+
|
26
70
|
@dataclass
|
27
71
|
class MappedEntity:
|
28
72
|
"""Represents the entity after applying the mapping
|
@@ -182,11 +226,16 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
182
226
|
return MappedEntity(
|
183
227
|
mapped_entity,
|
184
228
|
did_entity_pass_selector=should_run,
|
185
|
-
raw_data=data
|
229
|
+
raw_data=data,
|
186
230
|
misconfigurations=misconfigurations,
|
187
231
|
)
|
188
232
|
|
189
|
-
return MappedEntity(
|
233
|
+
return MappedEntity(
|
234
|
+
{},
|
235
|
+
did_entity_pass_selector=False,
|
236
|
+
raw_data=data,
|
237
|
+
misconfigurations={},
|
238
|
+
)
|
190
239
|
|
191
240
|
async def _calculate_entity(
|
192
241
|
self,
|
@@ -264,24 +313,26 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
264
313
|
|
265
314
|
passed_entities = []
|
266
315
|
failed_entities = []
|
267
|
-
examples_to_send
|
316
|
+
examples_to_send = ExampleStates(send_raw_data_examples_amount)
|
268
317
|
entity_misconfigurations: dict[str, str] = {}
|
269
318
|
missing_required_fields: bool = False
|
270
319
|
entity_mapping_fault_counter: int = 0
|
271
|
-
|
272
320
|
for result in calculated_entities_results:
|
273
321
|
if len(result.misconfigurations) > 0:
|
274
322
|
entity_misconfigurations |= result.misconfigurations
|
275
323
|
|
324
|
+
if (
|
325
|
+
len(examples_to_send) < send_raw_data_examples_amount
|
326
|
+
and result.raw_data is not None
|
327
|
+
):
|
328
|
+
examples_to_send.add_example(
|
329
|
+
result.did_entity_pass_selector, result.raw_data
|
330
|
+
)
|
331
|
+
|
276
332
|
if result.entity.get("identifier") and result.entity.get("blueprint"):
|
277
333
|
parsed_entity = Entity.parse_obj(result.entity)
|
278
334
|
if result.did_entity_pass_selector:
|
279
335
|
passed_entities.append(parsed_entity)
|
280
|
-
if (
|
281
|
-
len(examples_to_send) < send_raw_data_examples_amount
|
282
|
-
and result.raw_data is not None
|
283
|
-
):
|
284
|
-
examples_to_send.append(result.raw_data)
|
285
336
|
else:
|
286
337
|
failed_entities.append(parsed_entity)
|
287
338
|
else:
|
@@ -294,20 +345,10 @@ class JQEntityProcessor(BaseEntityProcessor):
|
|
294
345
|
entity_mapping_fault_counter,
|
295
346
|
)
|
296
347
|
|
297
|
-
|
298
|
-
not calculated_entities_results
|
299
|
-
and raw_results
|
300
|
-
and send_raw_data_examples_amount > 0
|
301
|
-
):
|
302
|
-
logger.warning(
|
303
|
-
f"No entities were parsed from {len(raw_results)} raw results, sending raw data examples"
|
304
|
-
)
|
305
|
-
examples_to_send = raw_results[:send_raw_data_examples_amount]
|
306
|
-
|
307
|
-
await self._send_examples(examples_to_send, mapping.kind)
|
348
|
+
await self._send_examples(examples_to_send.get_examples(), mapping.kind)
|
308
349
|
|
309
350
|
return CalculationResult(
|
310
351
|
EntitySelectorDiff(passed=passed_entities, failed=failed_entities),
|
311
352
|
errors,
|
312
|
-
|
353
|
+
misconfigured_entity_keys=entity_misconfigurations,
|
313
354
|
)
|