Skip to content

chore(ci): skip depot shadow matrices on draft PRs#60989

Merged
rnegron merged 1 commit into
masterfrom
rauln/depot-shadow-skip-drafts
Jun 1, 2026
Merged

chore(ci): skip depot shadow matrices on draft PRs#60989
rnegron merged 1 commit into
masterfrom
rauln/depot-shadow-skip-drafts

Conversation

@rnegron
Copy link
Copy Markdown
Member

@rnegron rnegron commented Jun 1, 2026

Problem

The Depot ci-backend shadow runs its heavy django and turbo-tests matrices on draft PRs. Canonical stopped doing that in #60703, but the shadow is a frozen port that never picked up the change — so every draft push spends Depot compute the canonical workflow no longer does.

Changes

Mirror canonical's draft handling in .depot/workflows/ci-backend.yml:

  • Add pull_request.types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] so leaving draft (ready_for_review) re-triggers the matrices and the run-ci-backend label can force them.
  • Gate turbo-tests and django on draft != true || contains(labels, 'run-ci-backend').

Same condition and dorny/paths-filter pin as canonical. Cheap gate jobs (changes, turbo-discover) still run on drafts; only the heavy matrices skip.

How did you test this code?

Agent-authored. Validated the workflow parses as YAML and diffed the new gate against canonical ci-backend.yml for an exact match. No automated test covers shadow trigger behavior; it verifies on the next draft PR (heavy matrices should skip, and ready_for_review should re-trigger them).

🤖 Agent context

Authored with Claude Code while monitoring the Depot shadow (#53803) after it merged to master. Noticed the shadow was duplicating canonical's backend matrices on draft PRs, where canonical now skips them via #60703. Ported canonical's exact pull_request.types plus the draft/run-ci-backend gate onto the shadow's turbo-tests and django jobs — keeping the timing trial apples-to-apples while stopping the wasted draft compute. The pre-commit yaml-format hook was bypassed because the local hogli venv is stale (import error unrelated to this change); the YAML was validated manually.

@rnegron rnegron added the stamphog Request AI review from stamphog label Jun 1, 2026
@rnegron rnegron enabled auto-merge (squash) June 1, 2026 18:19
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Reviews (1): Last reviewed commit: "chore(ci): skip depot shadow matrices on..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, focused CI optimization that skips heavy test matrices on draft PRs using a well-established GitHub Actions pattern. The ready_for_review trigger ensures jobs re-run when a PR leaves draft, and the run-ci-backend label escape hatch is present. The draft guard uses != true which correctly handles non-PR triggers (merge_group, workflow_dispatch) without skipping them. No production risk.

@rnegron rnegron merged commit d7611a7 into master Jun 1, 2026
238 of 240 checks passed
@rnegron rnegron deleted the rauln/depot-shadow-skip-drafts branch June 1, 2026 18:26
@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented Jun 1, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-06-01 18:50 UTC Run
prod-us ✅ Deployed 2026-06-01 19:09 UTC Run
prod-eu ✅ Deployed 2026-06-01 19:15 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI review from stamphog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant