Skip to content

Commit

Permalink
Merge branch 'master' into feature/openapi-pydantic
Browse files Browse the repository at this point in the history
# Conflicts:
#	frontend/src/queries/schema.ts
  • Loading branch information
webjunkie committed Jan 12, 2024
2 parents db88128 + ae85bae commit b0f41be
Show file tree
Hide file tree
Showing 215 changed files with 2,896 additions and 1,541 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-hogql-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
curl -s -u posthog-bot:${{ secrets.POSTHOG_BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} -X POST -d "{ \"body\": \"$message_body\" }" "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
fi
fi
echo "::set-output name=parser-release-needed::$parser_release_needed"
echo "parser-release-needed=$parser_release_needed" >> $GITHUB_OUTPUT
build-wheels:
name: Build wheels on ${{ matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/container-images-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Check for changes in plugins directory
id: check_changes_plugins
run: |
echo "::set-output name=changed::$(git diff --name-only HEAD^ HEAD | grep '^plugin-server/' || true)"
echo "changed=$(git diff --name-only HEAD^ HEAD | grep '^plugin-server/' || true)" >> $GITHUB_OUTPUT
- name: Trigger Ingestion Cloud deployment
if: steps.check_changes_plugins.outputs.changed != ''
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Check for changes that affect batch exports temporal worker
id: check_changes_batch_exports_temporal_worker
run: |
echo "::set-output name=changed::$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' || true)"
echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT
- name: Trigger Batch Exports Temporal Worker Cloud deployment
if: steps.check_changes_batch_exports_temporal_worker.outputs.changed != ''
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Check for changes that affect data warehouse temporal worker
id: check_changes_data_warehouse_temporal_worker
run: |
echo "::set-output name=changed::$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' || true)"
echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT
- name: Trigger Data Warehouse Temporal Worker Cloud deployment
if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed != ''
Expand Down
2 changes: 1 addition & 1 deletion bin/build-schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ fs.writeFile(output_path, schemaString, (err) => {
if (err) {
throw err;
}
});
});
3 changes: 3 additions & 0 deletions ee/api/ee_event_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
Detail,
)

from loginas.utils import is_impersonated_session


class EnterpriseEventDefinitionSerializer(TaggedItemSerializerMixin, serializers.ModelSerializer):
updated_by = UserBasicSerializer(read_only=True)
Expand Down Expand Up @@ -98,6 +100,7 @@ def update(self, event_definition: EnterpriseEventDefinition, validated_data):
item_id=str(event_definition.id),
scope="EventDefinition",
activity="changed",
was_impersonated=is_impersonated_session(self.context["request"]),
detail=Detail(name=str(event_definition.name), changes=changes),
)

Expand Down
2 changes: 2 additions & 0 deletions ee/api/ee_property_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
log_activity,
Detail,
)
from loginas.utils import is_impersonated_session


class EnterprisePropertyDefinitionSerializer(TaggedItemSerializerMixin, serializers.ModelSerializer):
Expand Down Expand Up @@ -77,6 +78,7 @@ def update(self, property_definition: EnterprisePropertyDefinition, validated_da
organization_id=None,
team_id=self.context["team_id"],
user=self.context["request"].user,
was_impersonated=is_impersonated_session(self.context["request"]),
item_id=str(property_definition.id),
scope="PropertyDefinition",
activity="changed",
Expand Down
4 changes: 2 additions & 2 deletions ee/api/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class PublicIntegrationViewSet(viewsets.GenericViewSet):
queryset = Integration.objects.all()
serializer_class = IntegrationSerializer

authentication_classes = [] # type: ignore
permission_classes = [] # type: ignore
authentication_classes = []
permission_classes = []

@action(methods=["POST"], detail=False, url_path="slack/events")
def slack_events(self, request: Request, *args: Any, **kwargs: Any) -> Response:
Expand Down
12 changes: 6 additions & 6 deletions ee/api/test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LicensedTestMixin:

CONFIG_LICENSE_KEY: Optional[str] = "12345::67890"
CONFIG_LICENSE_PLAN: Optional[str] = "enterprise"
license: License = None # type: ignore
license: License = None

def license_required_response(
self,
Expand All @@ -30,17 +30,17 @@ def license_required_response(

@classmethod
def setUpTestData(cls):
super().setUpTestData() # type: ignore
super().setUpTestData()
if cls.CONFIG_LICENSE_PLAN:
cls.license = super(LicenseManager, cast(LicenseManager, License.objects)).create(
key=cls.CONFIG_LICENSE_KEY,
plan=cls.CONFIG_LICENSE_PLAN,
valid_until=datetime.datetime(2038, 1, 19, 3, 14, 7, tzinfo=ZoneInfo("UTC")),
)
if hasattr(cls, "organization") and cls.organization: # type: ignore
cls.organization.available_product_features = AVAILABLE_PRODUCT_FEATURES # type: ignore
cls.organization.update_available_features() # type: ignore
cls.organization.save() # type: ignore
if hasattr(cls, "organization") and cls.organization:
cls.organization.available_product_features = AVAILABLE_PRODUCT_FEATURES
cls.organization.update_available_features()
cls.organization.save()


class APILicensedTest(LicensedTestMixin, APIBaseTest):
Expand Down
36 changes: 24 additions & 12 deletions ee/clickhouse/queries/funnels/test/__snapshots__/test_funnel.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestFunnelGroupBreakdown.test_funnel_breakdown_group.4
Expand Down Expand Up @@ -686,7 +687,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestFunnelGroupBreakdown.test_funnel_breakdown_group.6
Expand Down Expand Up @@ -821,7 +823,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestFunnelGroupBreakdown.test_funnel_breakdown_group.8
Expand Down Expand Up @@ -956,7 +959,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestStrictFunnelGroupBreakdown.test_funnel_aggregate_by_groups_breakdown_group_person_on_events
Expand Down Expand Up @@ -1489,7 +1493,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestStrictFunnelGroupBreakdown.test_funnel_breakdown_group.4
Expand Down Expand Up @@ -1602,7 +1607,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestStrictFunnelGroupBreakdown.test_funnel_breakdown_group.6
Expand Down Expand Up @@ -1715,7 +1721,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestStrictFunnelGroupBreakdown.test_funnel_breakdown_group.8
Expand Down Expand Up @@ -1828,7 +1835,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestUnorderedFunnelGroupBreakdown.test_funnel_aggregate_by_groups_breakdown_group_person_on_events
Expand Down Expand Up @@ -2526,7 +2534,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestUnorderedFunnelGroupBreakdown.test_funnel_breakdown_group.14
Expand Down Expand Up @@ -2804,7 +2813,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('technology'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestUnorderedFunnelGroupBreakdown.test_funnel_breakdown_group.2
Expand Down Expand Up @@ -3082,7 +3092,8 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
# name: TestUnorderedFunnelGroupBreakdown.test_funnel_breakdown_group.6
Expand Down Expand Up @@ -3360,6 +3371,7 @@
AND arrayFlatten(array(prop)) = arrayFlatten(array('finance'))
ORDER BY aggregation_target
LIMIT 100
OFFSET 0
OFFSET 0 SETTINGS max_ast_elements=1000000,
max_expanded_ast_elements=1000000
'''
# ---
Loading

0 comments on commit b0f41be

Please sign in to comment.