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): use sparse checkout for dagster path validation (#126502)

posthog[bot]38e27f75a61d
diff --git a/.github/workflows/ci-dagster.yml b/.github/workflows/ci-dagster.yml
index 787b4cd2a826..acaa275a6147 100644
--- a/.github/workflows/ci-dagster.yml
+++ b/.github/workflows/ci-dagster.yml
@@ -83,6 +83,15 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
clean: false
+ sparse-checkout: |
+ .github/actions/setup-uv
+ .github/scripts/check-dagster-paths.py
+ .github/workflows/ci-dagster.yml
+ posthog/**/*.py
+ ee/**/*.py
+ products/**/*.py
+ common/**/*.py
+ sparse-checkout-cone-mode: false
- uses: ./.github/actions/setup-uv
with:
enable-cache: false
diff --git a/docs/internal/ci-things-already-tried.md b/docs/internal/ci-things-already-tried.md
index b3c31305860d..350e4187b9ff 100644
--- a/docs/internal/ci-things-already-tried.md
+++ b/docs/internal/ci-things-already-tried.md
@@ -465,6 +465,7 @@ The PR did not merge, and no person reviewed it. The stale bot closed it. Thus t
Sparse-checkout is correct for small jobs, and `ci-storybook.yml`, `ci-security.yaml`, and `pr-resolve-outdated-bot-comments.yml` use it today.
`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.
`ci-rust.yml` also uses it on the build and test jobs, but that came before this PR.
The large Python and frontend test jobs do not use it. Their checkout is complete.