: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
fix(ci): deploy the health check worker for product detectors (#98187)
Paul D'Ambrad31fe4f5c288
diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.ymlindex 69832870f89f..ab4ddf9f25e1 100644--- a/.github/workflows/container-images-cd.yml+++ b/.github/workflows/container-images-cd.yml@@ -593,7 +593,10 @@ jobs:healthCheck:- 'posthog/temporal/health_checks/**'- - 'products/.*/backend/temporal/health_checks/**'+ - 'products/*/backend/temporal/health_checks/**'+ # `.dockerignore` keeps test files out of every image, so a+ # test-only edit cannot reach the running worker.+ - '!products/*/backend/temporal/health_checks/tests/**'- 'posthog/temporal/common/**'- 'posthog/management/commands/start_temporal_worker.py'- 'posthog/clickhouse/migrations/**'@@ -1064,8 +1067,33 @@ jobs:"timestamp": "${{ github.event.head_commit.timestamp }}"}+ # The product path list for this worker lives in the filter step above and+ # is not itself one of its paths. This clause deploys once when that list+ # changes, so detectors the list newly covers ship with the worker.+ - name: Check whether this workflow added health check worker coverage+ id: check_health_check_coverage_added+ env:+ BEFORE: ${{ github.event.before }}+ run: |+ BASE="$BEFORE"+ if [ -z "$BASE" ] || [ "$BASE" = "0000000000000000000000000000000000000000" ]; then+ BASE="$(git rev-list --max-parents=0 HEAD)"+ elif ! git fetch --depth=1 --no-tags origin "$BASE"; then+ echo "::error::Unable to fetch the workflow event base commit ($BASE)"+ exit 1+ fi+ if ! DIFF="$(git diff "$BASE" HEAD -- .github/workflows/container-images-cd.yml)"; then+ echo "::error::Unable to inspect workflow changes between $BASE and HEAD"+ exit 1+ fi+ if grep -qE '^\+.*health_checks' <<< "$DIFF"; then+ echo "changed=true" >> $GITHUB_OUTPUT+ else+ echo "changed=false" >> $GITHUB_OUTPUT+ fi+- name: Trigger Health Check Temporal Worker Cloud deployment- if: steps.check_temporal_worker_changes.outputs.healthCheck == 'true'+ if: steps.check_temporal_worker_changes.outputs.healthCheck == 'true' || steps.check_health_check_coverage_added.outputs.changed == 'true'uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1with:token: ${{ steps.deployer.outputs.token }}