chore(ci): skip depot shadow matrices on draft PRs#60989
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "chore(ci): skip depot shadow matrices on..." | Re-trigger Greptile |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Depot
ci-backendshadow runs its heavydjangoandturbo-testsmatrices 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:pull_request.types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]so leaving draft (ready_for_review) re-triggers the matrices and therun-ci-backendlabel can force them.turbo-testsanddjangoondraft != true || contains(labels, 'run-ci-backend').Same condition and
dorny/paths-filterpin 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.ymlfor an exact match. No automated test covers shadow trigger behavior; it verifies on the next draft PR (heavy matrices should skip, andready_for_reviewshould 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.typesplus thedraft/run-ci-backendgate onto the shadow'sturbo-testsanddjangojobs — keeping the timing trial apples-to-apples while stopping the wasted draft compute. The pre-commit yaml-format hook was bypassed because the localhoglivenv is stale (import error unrelated to this change); the YAML was validated manually.