ci: build PRs against the pinned DuckDB submodule, not the branch tip#543
Open
NickCrews wants to merge 1 commit into
Open
ci: build PRs against the pinned DuckDB submodule, not the branch tip#543NickCrews wants to merge 1 commit into
NickCrews wants to merge 1 commit into
Conversation
PR CI currently overrides the submodule and checks out the tip of the matching duckdb/duckdb branch at run time. This makes PR results a function of the wall clock: a green PR turns red a week later because upstream changed, even when the PR only touches this repository. Dropping the override makes PR CI build the commit the submodule actually pins, so results are reproducible for an identical diff. Upstream drift is still caught where it has an owner: the duckdblabs bot's periodic submodule-bump PRs, whose CI now also starts testing the exact SHA they pin (previously they, too, built the moving branch tip rather than the commit being pinned). This matches duckdb-java, where PR CI builds only the vendored (pinned) engine sources and a separate Vendor workflow advances them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 13, 2026
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.
ci: build PRs against the pinned DuckDB submodule, not the branch tip
The problem
PR CI doesn't build the DuckDB commit this repo pins.
on_pr.ymlpassesduckdb-sha: ${{ github.base_ref }}into the packaging workflow (andduckdb_git_refinto coverage), which makes the build step do:So every PR builds against the tip of the matching duckdb/duckdb branch at the moment the workflow runs. In practice:
git checkout maininsideexternal/duckdbto see what CI sees.What this PR changes
Drop the two
base_refoverrides fromon_pr.yml. The checkout-override steps inpackaging_sdist.yml,packaging_wheels.yml, andcoverage.ymlare already conditional on the input being set, so PR CI simply falls back to building the commit the submodule actually pins. Reproducible: same diff, same result, regardless of when it runs.Doesn't this lose the early-warning signal against duckdb main?
I don't think so, for two reasons:
The pin already tracks duckdb head closely. The duckdblabs bot opens submodule-bump PRs roughly weekly against both
mainandv1.5-variegata, and they merge regularly. Drift between the pin and the branch tip is bounded to days by that automation, independent of what PR CI builds. Incompatibilities with new duckdb changes surface on the bump PR — which is exactly where they have an owner — instead of on unrelated contributor PRs.Today, nothing in CI ever tests the pinned commit — including the bump PRs themselves. A bump PR's own CI also checks out
base_ref, i.e. the moving branch tip, not the SHA it is pinning. With this change, bump-PR CI starts validating the exact commit being pinned, which arguably makes the bump automation more trustworthy, not less.If a standing canary against duckdb head is still wanted, a small scheduled workflow calling the existing
packaging.ymlwithduckdb-sha: main(filing/updating a tracking issue on failure) would provide that signal without coupling it to contributor PRs. Happy to add that here or in a follow-up if there's interest.Precedent
duckdb-java already works this way: PR CI (
Java.yml) builds only the vendored (pinned) engine sources and never checks out duckdb/duckdb; a separateVendor.ymlworkflow advances the vendored copy. This PR brings duckdb-python in line with that model.For history: the
base_refoverride dates back to #4 in the first week after the split from duckdb/duckdb, as part of getting CI running at all — I couldn't find any discussion choosing branch-tip builds over pinned builds, so I'm assuming it was incidental rather than intentional. If it was deliberate and I'm missing context, happy to close.🤖 Generated with Claude Code