diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml index b393214ec72da..c5cacd1dec579 100644 --- a/.github/workflows/container-images-cd.yml +++ b/.github/workflows/container-images-cd.yml @@ -227,3 +227,24 @@ jobs: "labels": ${{ steps.labels.outputs.labels }}, "timestamp": "${{ github.event.head_commit.timestamp }}" } + + - name: Trigger Data Warehouse V2 Temporal Worker Cloud deployment + if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed == 'true' + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.deployer.outputs.token }} + repository: PostHog/charts + event-type: commit_state_update + client-payload: | + { + "values": { + "image": { + "sha": "${{ steps.build.outputs.digest }}" + } + }, + "release": "temporal-worker-data-warehouse-v2", + "commit": ${{ toJson(github.event.head_commit) }}, + "repository": ${{ toJson(github.repository) }}, + "labels": ${{ steps.labels.outputs.labels }}, + "timestamp": "${{ github.event.head_commit.timestamp }}" + } diff --git a/posthog/constants.py b/posthog/constants.py index af2ede6c13e68..a2c69e8058947 100644 --- a/posthog/constants.py +++ b/posthog/constants.py @@ -302,6 +302,7 @@ class FlagRequestType(StrEnum): ENRICHED_DASHBOARD_INSIGHT_IDENTIFIER = "Feature Viewed" DATA_WAREHOUSE_TASK_QUEUE = "data-warehouse-task-queue" +V2_DATA_WAREHOUSE_TASK_QUEUE = "v2-data-warehouse-task-queue" BATCH_EXPORTS_TASK_QUEUE = "batch-exports-task-queue" SYNC_BATCH_EXPORTS_TASK_QUEUE = "no-sandbox-python-django" GENERAL_PURPOSE_TASK_QUEUE = "general-purpose-task-queue" diff --git a/posthog/management/commands/start_temporal_worker.py b/posthog/management/commands/start_temporal_worker.py index 706516f3e5643..005114ac4c704 100644 --- a/posthog/management/commands/start_temporal_worker.py +++ b/posthog/management/commands/start_temporal_worker.py @@ -13,6 +13,7 @@ DATA_WAREHOUSE_TASK_QUEUE, GENERAL_PURPOSE_TASK_QUEUE, SYNC_BATCH_EXPORTS_TASK_QUEUE, + V2_DATA_WAREHOUSE_TASK_QUEUE, ) from posthog.temporal.batch_exports import ( ACTIVITIES as BATCH_EXPORTS_ACTIVITIES, @@ -27,12 +28,14 @@ SYNC_BATCH_EXPORTS_TASK_QUEUE: BATCH_EXPORTS_WORKFLOWS, BATCH_EXPORTS_TASK_QUEUE: BATCH_EXPORTS_WORKFLOWS, DATA_WAREHOUSE_TASK_QUEUE: DATA_SYNC_WORKFLOWS + DATA_MODELING_WORKFLOWS, + V2_DATA_WAREHOUSE_TASK_QUEUE: DATA_SYNC_WORKFLOWS + DATA_MODELING_WORKFLOWS, GENERAL_PURPOSE_TASK_QUEUE: PROXY_SERVICE_WORKFLOWS, } ACTIVITIES_DICT = { SYNC_BATCH_EXPORTS_TASK_QUEUE: BATCH_EXPORTS_ACTIVITIES, BATCH_EXPORTS_TASK_QUEUE: BATCH_EXPORTS_ACTIVITIES, DATA_WAREHOUSE_TASK_QUEUE: DATA_SYNC_ACTIVITIES + DATA_MODELING_ACTIVITIES, + V2_DATA_WAREHOUSE_TASK_QUEUE: DATA_SYNC_ACTIVITIES + DATA_MODELING_ACTIVITIES, GENERAL_PURPOSE_TASK_QUEUE: PROXY_SERVICE_ACTIVITIES, }