: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): fall back to an older schema dump in check-migrations (#84467)
Thiago Salvatoree69faebd3802
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.ymlindex 8e4dc539dea6..756b0a2132b6 100644--- a/.depot/workflows/ci-backend.yml+++ b/.depot/workflows/ci-backend.yml@@ -1164,8 +1164,7 @@ jobs:# Must match the migration-set computation in turbo-discover and the# push-side save below (inputs, hash, and key prefix). Keyed off the# master checkout (HEAD here) so a restored dump is exactly the state- # that "Run migrations up to master" would build from scratch; any- # difference in the migration set is a cache miss, never a stale hit.+ # that "Run migrations up to master" would build from scratch.if: github.event_name != 'push'id: master-schema-keyrun: |@@ -1189,6 +1188,11 @@ jobs:with:path: schema.sql.gzkey: ${{ steps.master-schema-key.outputs.key }}+ # The exact key misses in the minutes between a master migration+ # landing and its dump being saved. The PR base commit's dump is+ # always older than the checkout, so migrate just tops it up.+ restore-keys: |+ posthog-schema-master-${{ github.event.pull_request.base.sha }}- name: Wait for Docker servicesenv:COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.ymldiff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.ymlindex d54f60cce5e8..330059f4c0bd 100644--- a/.github/workflows/ci-backend.yml+++ b/.github/workflows/ci-backend.yml@@ -1455,8 +1455,7 @@ jobs:# Must match the migration-set computation in turbo-discover and the# push-side save below (inputs, hash, and key prefix). Keyed off the# master checkout (HEAD here) so a restored dump is exactly the state- # that "Run migrations up to master" would build from scratch; any- # difference in the migration set is a cache miss, never a stale hit.+ # that "Run migrations up to master" would build from scratch.if: github.event_name != 'push'id: master-schema-keyrun: |@@ -1481,6 +1480,11 @@ jobs:with:path: schema.sql.gzkey: ${{ steps.master-schema-key.outputs.key }}+ # The exact key misses in the minutes between a master migration+ # landing and its dump being saved. The PR base commit's dump is+ # always older than the checkout, so migrate just tops it up.+ restore-keys: |+ posthog-schema-master-${{ github.event.pull_request.base.sha }}- name: Wait for Docker servicesenv: