feat(ci): Auto-fetch Velox staging PRs from github project board and add nightly staging workflow #422
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #422"
general
weight: 0.35
Avinash-Raj
Summary
Switches staging PR auto-fetch from GitHub labels to the NVIDIA project board, and adds a
stagingworkflow that refreshes the Velox and Presto staging branches nightly.
Previously
create_staging_branch.shcollected PRs by thecudflabel, so staging contained whateverhappened to be labelled. There was no way to stage a PR without labelling it upstream, and no single
place to see what was queued. The board at NVIDIA/projects/306 is already the team's source
of truth, so staging now reads it directly.
Image builds from the staging branch are not part of this PR; they live in #424.
Where the staging branches are created
staging.ymlruns at 03:00 UTC (plusworkflow_dispatch/workflow_call) and fans out to two independent jobs with no dependency between them, so a Velox conflict does not block Presto:| Job | Base | Target | Branches pushed | Script | Token |
|-----|------|--------|-----------------|--------|-------|
|
velox-staging|facebookincubator/velox@main|rapidsai/velox|staging,staging_MM-DD-YYYY|velox/scripts/create_staging.sh|VELOX_FORK_PAT||
presto-staging|prestodb/presto@master|karthikeyann/presto|staging,staging_MM-DD-YYYY|presto/scripts/create_staging.sh|PRESTO_FORK_PAT|Call chain for each job:
create-staging-composite.ymlholds the actual step sequence, and every step is one invocation of theshared
scripts/create_staging_branch.sh: clone the target repo, resetstagingto the upstream basecommit, fetch the PR list from the board, test merges, merge, write
.staging-manifest.yaml, and push.Both
stagingand the dated snapshot go out in a singlegit pushwith two refspecs, so they cannotdiverge.
force_push: trueis required becausestagingis rebuilt from upstream every run and istherefore never a fast-forward over the previous branch.
Changes
PR discovery (
scripts/create_staging_branch.sh)fetch_prs_from_project(), which reads the board with a single paginatedgh api graphqlcalland keeps items whose
Velox Stagingfield isStaging.PVT_kwDOABpemM4BgGAW) rather than owner + number, perreview feedback. The ID survives the board being renamed, moved between owners, or renumbered, and
it skips the owner-type lookup
gh project item-listperforms — which is what requiredread:orgon top of
read:projectand produced the misleadingunknown owner typefailure in CI.state,isDraft, andrepositoryper PR, so closed and draft cardsare filtered from the same response (no second
gh pr listcall) and the skip log reports the actualreason, e.g.
Skipping project PR #28398 (state=OPEN, draft=true).Velox Stagingfield, soresults are separated by
--base-repository. Constants are namedSTAGING_PROJECT_*to reflectthat the script is shared rather than Velox-specific.
--pr-labelsoverrides the board for one-off runs.Empty board is a no-op, not a failure
Auto-fetch previously aborted with
No PRs found to mergewhenever nothing was markedStaging, so aquiet night failed the nightly.
fetch_pr_listnow emitsPR_COUNT=0and returns cleanly, and thecomposite skips test-merge, test-pairwise, merge, manifest, and push on that count — the target branch
is left exactly as the last successful run produced it. An explicitly supplied PR list that resolves to
empty still fails, since that is a misconfiguration.
Token handling
project_board_patsecret, wired fromPROJECT_BOARD_TOKENand applied asGH_TOKENon the Fetch PR list step only, so board scopes stay away from the clone, merge, and pushsteps. Only
read:projectis needed now that the board is addressed by node ID.GITHUB_TOKENtocontents: readacross the staging chain. Every git operation runs with thefork PAT, so the write grant was unused; it had to be repeated at each level only because a called
workflow cannot be granted more than its caller.
Workflow plumbing
velox-create-staging.ymlandpresto-create-staging.ymleach gain aworkflow_calltrigger sostaging.ymlcan call them. Inputs are declared once and aliased with YAML anchors, matchingvelox.yml, so there is no duplicated input block to keep in sync.target_repositorymoves fromrequired: truetorequired: falseon both; it keeps its default,so the dispatch forms are unchanged.
auto_fetch_prsnow defaults totruefor Presto as well as Velox, and the Presto wrapper script nolonger forces
--auto-fetch-prs false.Conflict handling
Conflicts are detected up front, never auto-resolved, and abort the run before anything is pushed.
Three gates:
1. Each PR against base (
test-merge) — every PR is merged with--no-commit --no-ff, thenaborted and reset to
BASE_COMMITso tests cannot contaminate each other. All PRs are checkedbefore failing, so the log lists every conflicting PR with its URL rather than just the first.
2. Every pair together (
test-pairwise) — all A+B combinations are tried; on failure the logincludes a compatibility matrix plus a table of the involved PRs with author, title, and URL.
3. The real merge (
merge) — a joint conflict among three or more PRs can survive both gatesabove, so the sequential merge aborts and exits non-zero as well.
Any of these fails the step and therefore the job. "Push branches" is the last step, so it never
executes: nothing reaches the target repo and
stagingremains as the last successful run left it. Thefailure propagates up through
create-staging-compositeand the per-project workflow to thevelox-stagingorpresto-stagingjob.The trade-off is bluntness: one conflicting PR costs that project's whole nightly refresh. The escape
hatch is
exclude_pr_numbers, reachable by dispatching the per-project workflow directly, or byremoving the card from the board.
Deployment note
PROJECT_BOARD_TOKENmust exist as a repo secret (classic PAT withread:project, from an accountthat can read project 306) before the nightly runs.
Testing
Stagingcards, skips thedraft (#28398), and keeps #27719 and #27975.
facebookincubator/veloxresolves to[]and
prestodb/prestoto[27719 27975], so neither path can see the other's cards.PR_COUNT=0, while an empty manuallist still exits 1.
staging.ymlcannot be dispatched until it is onmain, sinceworkflow_dispatchresolves workflownames against the default branch.