Repository navigation
feat: select the registry of a driver with source in dbc.toml - #599
Merged
Merged
Conversation
source in dbc.toml
This was referenced Nov 21, 2026
3 tasks done
A driver in dbc.toml can name the only registry it is resolved from:
[drivers.snowflake]
source = { type = "registry", name = "acme" }
The name refers to a [[registries]] entry in the same file; a url selects a
configured registry by its lock file identity. The driver is resolved from
that registry's index alone, so a missing driver, a missing version or a
failed fetch is an error instead of a fallback to another registry. A
source must bind to exactly one configured registry.
When the source selects another registry than the lock file records, dbc
sync stops and dbc lock resolves the driver again. dbc add --registry
records a source and dbc add keeps an existing one; dbc install --registry
installs from one registry of the user config. GetDriverList honors the
source as well.
Registry names must be unique within a file, and a configured name now
takes precedence over the name a registry's index gives itself.
An installed driver does not record the registry it came from, so the same version from the selected registry may be another package. Also keep the whole registry configuration when fetching the index of one registry.
zeroshade
force-pushed
the
feat/driver-registry-source
branch
from
November 23, 2026 16:34
d611a16 to
4fe4917
Compare
zeroshade
approved these changes
Nov 23, 2026
zeroshade
left a comment
Member
There was a problem hiding this comment.
source matches a registry by the same identity the lock file records and refuses ambiguous matches; there is no fallback; a source change stops dbc sync and is re-resolved by dbc lock; dbc add detects a concurrent change of a source or what its name refers to. go test ./... passes locally. LGTM.
eitsupi
added a commit
that referenced
this pull request
Nov 25, 2026
Addresses the review of #595: with #584, a registry that serves a driver name also serves it for every driver list that does not pin it, so adding a registry with its own key adds a code signer for every name it lists. This keeps the #584 fallback, which is what lets a driver move between the built-in registries, but only between registries with the same signer, and makes the choice fail when it cannot be checked. - **Same signer:** when several registries list a driver name, whatever their versions and platforms, they must all verify their packages with the same signer. Otherwise `ResolvePackage` returns a `SignerConflictError` that names the registries and their signers, before any package is selected or downloaded, and the CLI suggests a `source` in `dbc.toml` (#599) or `--registry`. Registry priority stays project → user → built-in. - **Missing index:** a registry whose index cannot be fetched or read might list the driver too. Its signer is known from its configuration, so `ResolvePackage` returns `ErrIncompleteIndex` only if that signer differs from the signer of the registries that list the driver (or, if none does, from another failed registry's signer), or if it cannot identify the failed registry or its signer. A failed registry with the same signer is skipped, as before this PR. This applies to new resolution in `dbc add`, `dbc install`, `dbc lock`, `dbc sync`, `Client.Install` and `Resolve` in the bindings. Replaying a lock entry that still satisfies the driver list, drivers with a `source` and `dbc install --registry` only need the registries they use. - **API:** `ResolvePackage` (unreleased, from #584) takes the error that `Search` returned with the drivers. `Search` reports each failed registry as a `RegistryIndexError` with the registry's configuration; its message leaves out the user information and query of the registry URL, also where the HTTP error repeats the request URL. - **Bindings' `Resolve`:** invalid registry metadata during package selection, such as a malformed archive hash or a missing version, now returns an error. If a listed driver has no eligible version, `Resolve` still returns its versions without `latest`. Previously both cases returned the same kind of result, even though `Install` already rejected the same invalid metadata on the host platform. - **Relation to #595:** there is no per-registry key setting yet, so every registry is verified with the built-in Columnar key: no conflict can occur and no failed index fails the signer check until #595 lands. #595 will derive the identity from each registry's signing policy (the digest of the configured certificate for a key, and an identity of its own for each unsigned registry), marked with TODO comments. Once #595 lands, a failed registry with a different signer can block resolution of drivers without a `source`. This should not be released before #595.
This branch was previously deployed
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.
Stacked on #598. Since #584, a driver comes from the highest-priority registry that has a matching version, so which registry serves a driver depends on the order of the registries and on what each one publishes at the time.
This lets a driver list name the one registry a driver comes from, like a dependency's registry in Cargo or
[tool.uv.sources]in uv.namerefers to a[[registries]]entry in the same file (a project cannot refer to a name from the user config);urlselects a configured registry by the identitydbc.lockrecords (no user information, query or fragment). The source must bind to exactly one configured registry, since registries that differ only in query cannot be told apart in the lockfile.typeis required so other source types can be added later (feat!: new lockfile format with GitHub release support via Packslip (PoC) #497).https://dbc-cdn.columnar.techandhttps://dbc-cdn-private.columnar.techhave no configured name, so a source selects them byurl, asflightsqldoes above. Declaring one in[[registries]]with anamealso works.dbc syncstops anddbc lockresolves the driver again (the pinned signer is still compared as before). Naming the same registry another way keeps the entry.dbc add --registry <name|url>records the source, anddbc addwithout it keeps a driver's existing source.dbc install --registry <name|url>installs from one registry of the user config, and installs again when the same version is already installed, since an installed driver does not record its registry.GetDriverListhonors the source too.Client.Installand the bindings have no registry option yet.sourceis also the onedbc searchshows.