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): narrow the backend timing collector checkout (#130011)

posthog[bot]9c4d01b6846f
diff --git a/.github/workflows/ci-backend-update-test-timing.yml b/.github/workflows/ci-backend-update-test-timing.yml
index ce779867f89c..b8a7879e1262 100644
--- a/.github/workflows/ci-backend-update-test-timing.yml
+++ b/.github/workflows/ci-backend-update-test-timing.yml
@@ -45,6 +45,14 @@ jobs:
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
token: ${{ steps.app-token.outputs.token }}
+ sparse-checkout: |
+ .github/actions/setup-uv
+ .github/scripts/depot_backend_runs.py
+ .github/scripts/optimize_test_durations.py
+ .python-version
+ products
+ uv.lock
+ sparse-checkout-cone-mode: false
- name: Install uv
uses: ./.github/actions/setup-uv
diff --git a/docs/internal/ci-things-already-tried.md b/docs/internal/ci-things-already-tried.md
index b319e7ee9ad7..c0c8c414e058 100644
--- a/docs/internal/ci-things-already-tried.md
+++ b/docs/internal/ci-things-already-tried.md
@@ -496,6 +496,7 @@ The description covers the backend, frontend, and Rust workflows. The diff chang
The PR did not merge, and no person reviewed it. The stale bot closed it. Thus there is no recorded reason for the result.
Sparse-checkout is correct for small jobs, and `ci-storybook.yml`, `ci-security.yaml`, and `pr-resolve-outdated-bot-comments.yml` use it today.
+The backend timing collector keeps the full `products/` tree because its optimizer uses product directory presence to retain timings for skipped products.
The bot IP updater needs only `bin/update-bots-list` and `nodejs/assets/bot-ips.txt`; its sparse checkout retains the tracked output so Git can detect and commit updates.
`ci-depot-action-mirrors.yml` checks out `.depot/`, `.github/actions/`, and `depot_mirrors.py`; its Git diff still covers all changed paths.
The Dagster path validator also uses a sparse checkout of every internal Python source file, its workflow, and the local uv action. Its import resolver needs the complete internal Python tree, including namespace packages.