diff --git a/ee/hogai/trends/nodes.py b/ee/hogai/trends/nodes.py index 3c740a822598e..9bd71adee91de 100644 --- a/ee/hogai/trends/nodes.py +++ b/ee/hogai/trends/nodes.py @@ -130,7 +130,7 @@ def _model(self) -> ChatOpenAI: @cached_property def _events_prompt(self) -> str: response = TeamTaxonomyQueryRunner(TeamTaxonomyQuery(), self._team).run( - ExecutionMode.RECENT_CACHE_CALCULATE_BLOCKING_IF_STALE + ExecutionMode.RECENT_CACHE_CALCULATE_ASYNC_IF_STALE_AND_BLOCKING_ON_MISS ) if not isinstance(response, CachedTeamTaxonomyQueryResponse): diff --git a/ee/hogai/trends/toolkit.py b/ee/hogai/trends/toolkit.py index 23421847e1085..a2f438756f3d1 100644 --- a/ee/hogai/trends/toolkit.py +++ b/ee/hogai/trends/toolkit.py @@ -292,7 +292,7 @@ def retrieve_event_properties(self, event_name: str) -> str: Retrieve properties for an event. """ runner = EventTaxonomyQueryRunner(EventTaxonomyQuery(event=event_name), self._team) - response = runner.run(ExecutionMode.RECENT_CACHE_CALCULATE_BLOCKING_IF_STALE) + response = runner.run(ExecutionMode.RECENT_CACHE_CALCULATE_ASYNC_IF_STALE_AND_BLOCKING_ON_MISS) if not isinstance(response, CachedEventTaxonomyQueryResponse): return "Properties have not been found." @@ -352,7 +352,7 @@ def retrieve_event_property_values(self, event_name: str, property_name: str) -> return f"The property {property_name} does not exist in the taxonomy." runner = EventTaxonomyQueryRunner(EventTaxonomyQuery(event=event_name), self._team) - response = runner.run(ExecutionMode.RECENT_CACHE_CALCULATE_BLOCKING_IF_STALE) + response = runner.run(ExecutionMode.RECENT_CACHE_CALCULATE_ASYNC_IF_STALE_AND_BLOCKING_ON_MISS) if not isinstance(response, CachedEventTaxonomyQueryResponse): return f"The event {event_name} does not exist in the taxonomy." @@ -426,7 +426,7 @@ def retrieve_entity_property_values(self, entity: str, property_name: str) -> st return f"The property {property_name} does not exist in the taxonomy for the entity {entity}." response = ActorsPropertyTaxonomyQueryRunner(query, self._team).run( - ExecutionMode.RECENT_CACHE_CALCULATE_BLOCKING_IF_STALE + ExecutionMode.RECENT_CACHE_CALCULATE_ASYNC_IF_STALE_AND_BLOCKING_ON_MISS ) if not isinstance(response, CachedActorsPropertyTaxonomyQueryResponse): diff --git a/posthog/api/test/__snapshots__/test_api_docs.ambr b/posthog/api/test/__snapshots__/test_api_docs.ambr index a5f9b394809ae..6ef31c6530176 100644 --- a/posthog/api/test/__snapshots__/test_api_docs.ambr +++ b/posthog/api/test/__snapshots__/test_api_docs.ambr @@ -97,8 +97,8 @@ '/home/runner/work/posthog/posthog/posthog/api/survey.py: Warning [SurveyViewSet > SurveySerializer]: unable to resolve type hint for function "get_conditions". Consider using a type hint or @extend_schema_field. Defaulting to string.', '/home/runner/work/posthog/posthog/posthog/api/web_experiment.py: Warning [WebExperimentViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.web_experiment.WebExperiment" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', 'Warning: encountered multiple names for the same choice set (HrefMatchingEnum). This may be unwanted even though the generated schema is technically correct. Add an entry to ENUM_NAME_OVERRIDES to fix the naming.', - 'Warning: enum naming encountered a non-optimally resolvable collision for fields named "kind". The same name has been used for multiple choice sets in multiple components. The collision was resolved with "KindCfaEnum". add an entry to ENUM_NAME_OVERRIDES to fix the naming.', 'Warning: enum naming encountered a non-optimally resolvable collision for fields named "kind". The same name has been used for multiple choice sets in multiple components. The collision was resolved with "Kind069Enum". add an entry to ENUM_NAME_OVERRIDES to fix the naming.', + 'Warning: enum naming encountered a non-optimally resolvable collision for fields named "kind". The same name has been used for multiple choice sets in multiple components. The collision was resolved with "KindCfaEnum". add an entry to ENUM_NAME_OVERRIDES to fix the naming.', 'Warning: enum naming encountered a non-optimally resolvable collision for fields named "type". The same name has been used for multiple choice sets in multiple components. The collision was resolved with "TypeF73Enum". add an entry to ENUM_NAME_OVERRIDES to fix the naming.', 'Warning: encountered multiple names for the same choice set (EffectivePrivilegeLevelEnum). This may be unwanted even though the generated schema is technically correct. Add an entry to ENUM_NAME_OVERRIDES to fix the naming.', 'Warning: encountered multiple names for the same choice set (MembershipLevelEnum). This may be unwanted even though the generated schema is technically correct. Add an entry to ENUM_NAME_OVERRIDES to fix the naming.',