:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(cdp): move the hog invocation serializers into products/cdp (#115433)
Harley Alexander3ec3af4c9cfd
diff --git a/products/cdp/backend/api/hog_function.py b/products/cdp/backend/api/hog_function.pyindex 4aea8085c39a..7d7b91c1382c 100644--- a/products/cdp/backend/api/hog_function.py+++ b/products/cdp/backend/api/hog_function.py@@ -24,7 +24,6 @@ from rest_framework.serializers import BaseSerializerfrom posthog.api.app_metrics2 import AppMetricsMixinfrom posthog.api.forbid_destroy_model import ForbidDestroyModel-from posthog.api.hog_invocation_rerun import HogInvocationRerunRequestSerializer, HogInvocationRerunResponseSerializerfrom posthog.api.log_entries import LogEntryMixinfrom posthog.api.routing import TeamAndOrgViewSetMixinfrom posthog.api.shared import SearchMatchTypeSerializerMixin, UserBasicSerializer@@ -79,6 +78,10 @@ from products.cdp.backend.models.hog_functions.hog_function import (from products.cdp.backend.models.hog_functions.hog_function_revision import HogFunctionRevisionfrom products.cdp.backend.models.hog_functions.utils import humanize_hog_function_typefrom products.cdp.backend.models.plugin import TranspilerError+from products.cdp.backend.presentation.hog_invocations.rerun import (+ HogInvocationRerunRequestSerializer,+ HogInvocationRerunResponseSerializer,+)# Maximum size of HOG code as a string in bytes (100KB)MAX_HOG_CODE_SIZE_BYTES = 100 * 1024diff --git a/products/cdp/backend/presentation/__init__.py b/products/cdp/backend/presentation/__init__.pynew file mode 100644index 000000000000..e69de29bb2d1diff --git a/products/cdp/backend/presentation/hog_invocations/__init__.py b/products/cdp/backend/presentation/hog_invocations/__init__.pynew file mode 100644index 000000000000..e69de29bb2d1diff --git a/posthog/api/hog_invocation_cancel.py b/products/cdp/backend/presentation/hog_invocations/cancel.pysimilarity index 95%rename from posthog/api/hog_invocation_cancel.pyrename to products/cdp/backend/presentation/hog_invocations/cancel.pyindex 5a64c110411e..a0356ba5f564 100644--- a/posthog/api/hog_invocation_cancel.py+++ b/products/cdp/backend/presentation/hog_invocations/cancel.py@@ -10,7 +10,7 @@ their lifecycle rows, metrics, and logs.from rest_framework import serializers-from posthog.api.hog_invocation_rerun import HOG_INVOCATION_RERUN_MAX_COUNT+from products.cdp.backend.presentation.hog_invocations.rerun import HOG_INVOCATION_RERUN_MAX_COUNTclass HogInvocationCancelRequestSerializer(serializers.Serializer):diff --git a/posthog/api/hog_invocation_rerun.py b/products/cdp/backend/presentation/hog_invocations/rerun.pysimilarity index 100%rename from posthog/api/hog_invocation_rerun.pyrename to products/cdp/backend/presentation/hog_invocations/rerun.pydiff --git a/posthog/api/hog_invocation_results.py b/products/cdp/backend/presentation/hog_invocations/results.pysimilarity index 100%rename from posthog/api/hog_invocation_results.pyrename to products/cdp/backend/presentation/hog_invocations/results.pydiff --git a/products/workflows/backend/presentation/views/hog_flow.py b/products/workflows/backend/presentation/views/hog_flow.pyindex 77db59b3f93f..1ff2e80b0538 100644--- a/products/workflows/backend/presentation/views/hog_flow.py+++ b/products/workflows/backend/presentation/views/hog_flow.py@@ -50,22 +50,6 @@ from posthog.api.app_metrics2 import (fetch_app_metrics_trends,)from posthog.api.documentation import _FallbackSerializer-from posthog.api.hog_invocation_cancel import (- HogInvocationCancelRequestSerializer,- HogInvocationCancelResponseSerializer,-)-from posthog.api.hog_invocation_rerun import HogInvocationRerunRequestSerializer, HogInvocationRerunResponseSerializer-from posthog.api.hog_invocation_results import (- HogInvocationResultDetailSerializer,- HogInvocationResultsCountSerializer,- HogInvocationResultSerializer,- HogInvocationResultsFiltersSerializer,- HogInvocationResultsRequestSerializer,- fetch_hog_invocation_result,- fetch_hog_invocation_results,- fetch_hog_invocation_results_count,- tag_invocation_results_query,-)from posthog.api.log_entries import LogEntryMixinfrom posthog.api.routing import TeamAndOrgViewSetMixinfrom posthog.api.shared import UserBasicSerializer@@ -104,6 +88,25 @@ from products.access_control.backend.presentation.access_control import (AccessControlViewSetMixin,UserAccessControlSerializerMixin,)+from products.cdp.backend.presentation.hog_invocations.cancel import (+ HogInvocationCancelRequestSerializer,+ HogInvocationCancelResponseSerializer,+)+from products.cdp.backend.presentation.hog_invocations.rerun import (+ HogInvocationRerunRequestSerializer,+ HogInvocationRerunResponseSerializer,+)+from products.cdp.backend.presentation.hog_invocations.results import (+ HogInvocationResultDetailSerializer,+ HogInvocationResultsCountSerializer,+ HogInvocationResultSerializer,+ HogInvocationResultsFiltersSerializer,+ HogInvocationResultsRequestSerializer,+ fetch_hog_invocation_result,+ fetch_hog_invocation_results,+ fetch_hog_invocation_results_count,+ tag_invocation_results_query,+)from products.messaging.backend.presentation.views.serializers import DesignOperationSerializerfrom products.notifications.backend.facade.api import publish_resource_editedfrom products.tasks.backend.facade.api import list_workflow_last_runs