Skip to content

: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.

chore(ci): surface upstream job failures in the django tests gate (#68003)

Paul D'Ambracf71ee500644
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index b01f9923acd4..3c2a420d9eae 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -1788,7 +1788,18 @@ jobs:
fi
# Job just to collate the status of the matrix jobs for requiring passing status
django_tests:
- needs: [sample, django, check-migrations, turbo-discover, turbo-tests, repo-checks]
+ needs:
+ [
+ sample,
+ changes,
+ get_clickhouse_versions,
+ build_django_matrix,
+ django,
+ check-migrations,
+ turbo-discover,
+ turbo-tests,
+ repo-checks,
+ ]
name: '[optional, does not block merge] Django Tests Pass'
runs-on: depot-ubuntu-latest # was: ubuntu-latest. Mapped standard GitHub runner to Depot equivalent.
timeout-minutes: 5
@@ -1802,6 +1813,9 @@ jobs:
echo "### Backend CI dependency results"
echo "| Dependency | Result |"
echo "| --- | --- |"
+ echo "| changes | ${{ needs.changes.result }} |"
+ echo "| get_clickhouse_versions | ${{ needs.get_clickhouse_versions.result }} |"
+ echo "| build_django_matrix | ${{ needs.build_django_matrix.result }} |"
echo "| django | ${{ needs.django.result }} |"
echo "| check-migrations | ${{ needs.check-migrations.result }} |"
echo "| repo-checks | ${{ needs.repo-checks.result }} |"
@@ -1828,6 +1842,13 @@ jobs:
exit 1
}
+ # Upstream jobs whose failure would otherwise only cascade into django
+ # being *skipped*, which this gate reads as success — a green gate with
+ # zero backend tests run. Naming them makes the failure hit the gate
+ # directly; legitimate skips (frontend-only PRs) and plain successes still pass.
+ check_required_result "Change detection" "${{ needs.changes.result }}"
+ check_required_result "ClickHouse versions" "${{ needs.get_clickhouse_versions.result }}"
+ check_required_result "Django matrix build" "${{ needs.build_django_matrix.result }}"
check_required_result "Django test matrix" "${{ needs.django.result }}"
check_required_result "Migration checks" "${{ needs.check-migrations.result }}"
check_required_result "Repo checks" "${{ needs.repo-checks.result }}"
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index d8f5e5f477a6..1fd2d59d0f17 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -2832,7 +2832,18 @@ jobs:
# Must depend on handle-snapshots to prevent auto-merge before commits complete
django_tests:
needs:
- [django, check-migrations, check-openapi-types, turbo-discover, turbo-tests, handle-snapshots, repo-checks]
+ [
+ changes,
+ get_clickhouse_versions,
+ build_django_matrix,
+ django,
+ check-migrations,
+ check-openapi-types,
+ turbo-discover,
+ turbo-tests,
+ handle-snapshots,
+ repo-checks,
+ ]
name: Django Tests Pass
runs-on: ubuntu-latest
timeout-minutes: 5
@@ -2846,6 +2857,9 @@ jobs:
echo "| --- | --- |"
echo "| repo-checks | ${{ needs.repo-checks.result }} |"
echo "| check-openapi-types | ${{ needs.check-openapi-types.result }} |"
+ echo "| changes | ${{ needs.changes.result }} |"
+ echo "| get_clickhouse_versions | ${{ needs.get_clickhouse_versions.result }} |"
+ echo "| build_django_matrix | ${{ needs.build_django_matrix.result }} |"
echo "| django | ${{ needs.django.result }} |"
echo "| check-migrations | ${{ needs.check-migrations.result }} |"
echo "| turbo-discover | ${{ needs.turbo-discover.result }} |"
@@ -2905,6 +2919,13 @@ jobs:
check_required_result "Repo checks" "${{ needs.repo-checks.result }}"
check_required_result "OpenAPI type checks" "${{ needs.check-openapi-types.result }}"
+ # Upstream jobs whose failure would otherwise only cascade into django
+ # being *skipped*, which this gate reads as success — a green gate with
+ # zero backend tests run. Naming them makes the failure hit the gate
+ # directly; legitimate skips (frontend-only PRs) and plain successes still pass.
+ check_required_result "Change detection" "${{ needs.changes.result }}"
+ check_required_result "ClickHouse versions" "${{ needs.get_clickhouse_versions.result }}"
+ check_required_result "Django matrix build" "${{ needs.build_django_matrix.result }}"
check_required_result "Django test matrix" "${{ needs.django.result }}"
check_required_result "Migration checks" "${{ needs.check-migrations.result }}"
check_required_result "Turbo discover" "${{ needs.turbo-discover.result }}"