port-ocean 0.12.2.dev3__tar.gz → 0.12.2.dev5__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.
Potentially problematic release.
This version of port-ocean might be problematic. Click here for more details.
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/PKG-INFO +1 -1
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/entities.py +40 -39
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/port/applier.py +32 -31
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/sync_raw.py +44 -46
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/pyproject.toml +1 -1
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/LICENSE.md +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/README.md +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/bootstrap.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cli.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/defaults/__init___.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/defaults/clean.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/defaults/dock.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/defaults/group.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/list_integrations.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/main.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/new.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/pull.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/sail.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/version.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/cookiecutter.json +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/extensions.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/hooks/post_gen_project.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.dockerignore +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.env.example +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.gitignore +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/.gitignore +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/blueprints.json +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/resources/port-app-config.yml +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/.port/spec.yaml +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CHANGELOG.md +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/CONTRIBUTING.md +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/Dockerfile +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/README.md +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/changelog/.gitignore +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/debug.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/main.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/poetry.toml +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/pyproject.toml +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/sonar-project.properties +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/{{cookiecutter.integration_slug}}/tests/test_sample.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/authentication.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/client.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/blueprints.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/integrations.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/migrations.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/retry_transport.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/types.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/config/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/config/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/config/dynamic.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/config/settings.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/consumers/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/consumers/kafka_consumer.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/context/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/context/event.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/context/ocean.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/context/resource.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/defaults/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/defaults/clean.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/defaults/common.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/defaults/initialize.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/factory.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/http.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/kafka.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/once.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/polling.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/port/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/port/get_related_entities.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entities_state_applier/port/order_by_entities_dependencies.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entity_processor/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entity_processor/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entity_processor/jq_entity_processor.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/api.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/models.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/resync_state_updater/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/resync_state_updater/updater.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/events.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/handler.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/sync.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/models.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/ocean_types.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/api.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/base.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/clients.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/context.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/core.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/port_defaults.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/exceptions/utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/helpers/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/helpers/async_client.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/helpers/retry.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/log/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/log/handlers.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/log/logger_setup.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/log/sensetive.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/middlewares.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/ocean.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/py.typed +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/run.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/sonar-project.properties +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/clients/port/mixins/test_entities.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/conftest.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/core/handlers/entity_processor/test_jq_entity_processor.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/fixtures.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/integration.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/ocean_app.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/port_client.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/helpers/smoke_test.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/tests/test_smoke.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/__init__.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/async_http.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/async_iterators.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/cache.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/misc.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/queue_utils.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/repeat.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/signal.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/utils/time.py +0 -0
- {port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/version.py +0 -0
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/entities.py
RENAMED
|
@@ -56,33 +56,33 @@ class EntityClientMixin:
|
|
|
56
56
|
f"entity: {entity.identifier} of "
|
|
57
57
|
f"blueprint: {entity.blueprint}"
|
|
58
58
|
)
|
|
59
|
-
handle_status_code(response, should_raise)
|
|
60
|
-
result = response.json()
|
|
61
|
-
|
|
62
|
-
result_entity = (
|
|
63
|
-
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
# Happens when upsert fails and search identifier is defined.
|
|
67
|
-
# We return None to ignore the entity later in the delete process
|
|
68
|
-
if result_entity.is_using_search_identifier:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# In order to save memory we'll keep only the identifier, blueprint and relations of the
|
|
72
|
-
# upserted entity result for later calculations
|
|
73
|
-
reduced_entity = Entity(
|
|
74
|
-
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
# Turning dict typed relations (raw search relations) is required
|
|
78
|
-
# for us to be able to successfully calculate the participation related entities
|
|
79
|
-
# and ignore the ones that don't as they weren't upserted
|
|
80
|
-
reduced_entity.relations = {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return
|
|
59
|
+
# handle_status_code(response, should_raise)
|
|
60
|
+
# result = response.json()
|
|
61
|
+
#
|
|
62
|
+
# result_entity = (
|
|
63
|
+
# Entity.parse_obj(result["entity"]) if result.get("entity") else entity
|
|
64
|
+
# )
|
|
65
|
+
#
|
|
66
|
+
# # Happens when upsert fails and search identifier is defined.
|
|
67
|
+
# # We return None to ignore the entity later in the delete process
|
|
68
|
+
# if result_entity.is_using_search_identifier:
|
|
69
|
+
# return None
|
|
70
|
+
#
|
|
71
|
+
# # In order to save memory we'll keep only the identifier, blueprint and relations of the
|
|
72
|
+
# # upserted entity result for later calculations
|
|
73
|
+
# reduced_entity = Entity(
|
|
74
|
+
# identifier=result_entity.identifier, blueprint=result_entity.blueprint
|
|
75
|
+
# )
|
|
76
|
+
#
|
|
77
|
+
# # Turning dict typed relations (raw search relations) is required
|
|
78
|
+
# # for us to be able to successfully calculate the participation related entities
|
|
79
|
+
# # and ignore the ones that don't as they weren't upserted
|
|
80
|
+
# reduced_entity.relations = {
|
|
81
|
+
# key: None if isinstance(relation, dict) else relation
|
|
82
|
+
# for key, relation in result_entity.relations.items()
|
|
83
|
+
# }
|
|
84
|
+
|
|
85
|
+
return None
|
|
86
86
|
|
|
87
87
|
async def batch_upsert_entities(
|
|
88
88
|
self,
|
|
@@ -91,7 +91,7 @@ class EntityClientMixin:
|
|
|
91
91
|
user_agent_type: UserAgentType | None = None,
|
|
92
92
|
should_raise: bool = True,
|
|
93
93
|
) -> list[Entity]:
|
|
94
|
-
|
|
94
|
+
await asyncio.gather(
|
|
95
95
|
*(
|
|
96
96
|
self.upsert_entity(
|
|
97
97
|
entity,
|
|
@@ -103,17 +103,18 @@ class EntityClientMixin:
|
|
|
103
103
|
),
|
|
104
104
|
return_exceptions=True,
|
|
105
105
|
)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
return []
|
|
107
|
+
# entity_results = [
|
|
108
|
+
# entity for entity in modified_entities_results if isinstance(entity, Entity)
|
|
109
|
+
# ]
|
|
110
|
+
# if not should_raise:
|
|
111
|
+
# return entity_results
|
|
112
|
+
#
|
|
113
|
+
# for entity_result in modified_entities_results:
|
|
114
|
+
# if isinstance(entity_result, Exception):
|
|
115
|
+
# raise entity_result
|
|
116
|
+
#
|
|
117
|
+
# return entity_results
|
|
117
118
|
|
|
118
119
|
async def delete_entity(
|
|
119
120
|
self,
|
|
@@ -97,37 +97,38 @@ class HttpEntitiesStateApplier(BaseEntitiesStateApplier):
|
|
|
97
97
|
self, entities: list[Entity], user_agent_type: UserAgentType
|
|
98
98
|
) -> list[Entity]:
|
|
99
99
|
logger.info(f"Upserting {len(entities)} entities")
|
|
100
|
-
modified_entities: list[Entity] = []
|
|
101
|
-
if event.port_app_config.create_missing_related_entities:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
else:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return modified_entities
|
|
100
|
+
# modified_entities: list[Entity] = []
|
|
101
|
+
# if event.port_app_config.create_missing_related_entities:
|
|
102
|
+
await self.context.port_client.batch_upsert_entities(
|
|
103
|
+
entities,
|
|
104
|
+
event.port_app_config.get_port_request_options(),
|
|
105
|
+
user_agent_type,
|
|
106
|
+
should_raise=False,
|
|
107
|
+
)
|
|
108
|
+
# else:
|
|
109
|
+
# entities_with_search_identifier: list[Entity] = []
|
|
110
|
+
# entities_without_search_identifier: list[Entity] = []
|
|
111
|
+
# for entity in entities:
|
|
112
|
+
# if entity.is_using_search_identifier:
|
|
113
|
+
# entities_with_search_identifier.append(entity)
|
|
114
|
+
# else:
|
|
115
|
+
# entities_without_search_identifier.append(entity)
|
|
116
|
+
#
|
|
117
|
+
# ordered_created_entities = reversed(
|
|
118
|
+
# entities_with_search_identifier
|
|
119
|
+
# + order_by_entities_dependencies(entities_without_search_identifier)
|
|
120
|
+
# )
|
|
121
|
+
# for entity in ordered_created_entities:
|
|
122
|
+
# upsertedEntity = await self.context.port_client.upsert_entity(
|
|
123
|
+
# entity,
|
|
124
|
+
# event.port_app_config.get_port_request_options(),
|
|
125
|
+
# user_agent_type,
|
|
126
|
+
# should_raise=False,
|
|
127
|
+
# )
|
|
128
|
+
# if upsertedEntity:
|
|
129
|
+
# modified_entities.append(upsertedEntity)
|
|
130
|
+
# return modified_entities
|
|
131
|
+
return []
|
|
131
132
|
|
|
132
133
|
async def delete(
|
|
133
134
|
self, entities: list[Entity], user_agent_type: UserAgentType
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/sync_raw.py
RENAMED
|
@@ -3,7 +3,6 @@ import inspect
|
|
|
3
3
|
import typing
|
|
4
4
|
from typing import Callable, Awaitable, Any
|
|
5
5
|
|
|
6
|
-
import httpx
|
|
7
6
|
from loguru import logger
|
|
8
7
|
|
|
9
8
|
from port_ocean.clients.port.types import UserAgentType
|
|
@@ -140,11 +139,11 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
|
|
|
140
139
|
objects_diff = await self._calculate_raw(
|
|
141
140
|
[(resource, results)], parse_all, send_raw_data_examples_amount
|
|
142
141
|
)
|
|
143
|
-
|
|
142
|
+
await self.entities_state_applier.upsert(
|
|
144
143
|
objects_diff[0].entity_selector_diff.passed, user_agent_type
|
|
145
144
|
)
|
|
146
145
|
return CalculationResult(
|
|
147
|
-
objects_diff[0].entity_selector_diff._replace(passed=
|
|
146
|
+
objects_diff[0].entity_selector_diff._replace(passed=objects_diff[0].entity_selector_diff.passed),
|
|
148
147
|
errors=objects_diff[0].errors,
|
|
149
148
|
)
|
|
150
149
|
|
|
@@ -173,49 +172,48 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
|
|
|
173
172
|
self, resource_config: ResourceConfig, user_agent_type: UserAgentType
|
|
174
173
|
) -> tuple[list[Entity], list[Exception]]:
|
|
175
174
|
results, errors = await self._get_resource_raw_results(resource_config)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
# )
|
|
175
|
+
async_generators: list[ASYNC_GENERATOR_RESYNC_TYPE] = []
|
|
176
|
+
raw_results: RAW_RESULT = []
|
|
177
|
+
for result in results:
|
|
178
|
+
if isinstance(result, dict):
|
|
179
|
+
raw_results.append(result)
|
|
180
|
+
else:
|
|
181
|
+
async_generators.append(result)
|
|
182
|
+
|
|
183
|
+
send_raw_data_examples_amount = (
|
|
184
|
+
SEND_RAW_DATA_EXAMPLES_AMOUNT if ocean.config.send_raw_data_examples else 0
|
|
185
|
+
)
|
|
186
|
+
all_entities, register_errors = await self._register_resource_raw(
|
|
187
|
+
resource_config,
|
|
188
|
+
raw_results,
|
|
189
|
+
user_agent_type,
|
|
190
|
+
send_raw_data_examples_amount=send_raw_data_examples_amount,
|
|
191
|
+
)
|
|
192
|
+
errors.extend(register_errors)
|
|
193
|
+
passed_entities = list(all_entities.passed)
|
|
194
|
+
|
|
195
|
+
for generator in async_generators:
|
|
196
|
+
try:
|
|
197
|
+
async for items in generator:
|
|
198
|
+
if send_raw_data_examples_amount > 0:
|
|
199
|
+
send_raw_data_examples_amount = max(
|
|
200
|
+
0, send_raw_data_examples_amount - len(passed_entities)
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
entities, register_errors = await self._register_resource_raw(
|
|
204
|
+
resource_config,
|
|
205
|
+
items,
|
|
206
|
+
user_agent_type,
|
|
207
|
+
send_raw_data_examples_amount=send_raw_data_examples_amount,
|
|
208
|
+
)
|
|
209
|
+
errors.extend(register_errors)
|
|
210
|
+
passed_entities.extend(entities.passed)
|
|
211
|
+
except* OceanAbortException as error:
|
|
212
|
+
errors.append(error)
|
|
213
|
+
|
|
214
|
+
logger.info(
|
|
215
|
+
f"Finished registering change for {len(results)} raw results for kind: {resource_config.kind}. {len(passed_entities)} entities were affected"
|
|
216
|
+
)
|
|
219
217
|
return passed_entities, errors
|
|
220
218
|
|
|
221
219
|
async def register_raw(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/defaults/__init___.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/commands/list_integrations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/cli/cookiecutter/cookiecutter.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/__init__.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/blueprints.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/integrations.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/mixins/migrations.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/clients/port/retry_transport.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/event_listener/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/entity_processor/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/api.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/base.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/handlers/port_app_config/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/__init__.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/events.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/handler.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/sync.py
RENAMED
|
File without changes
|
{port_ocean-0.12.2.dev3 → port_ocean-0.12.2.dev5}/port_ocean/core/integrations/mixins/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|