Skip to content

feat(info): show driver docs URL in dbc info - #511

Merged
amoeba merged 3 commits into
columnar-tech:mainfrom
djfrancesco:feat/info-docs-url
Oct 13, 2026
Merged

amoeba merged 3 commits into
columnar-tech:mainfrom
djfrancesco:feat/info-docs-url

Conversation

@djfrancesco

Copy link
Copy Markdown
Contributor

Closes #499

Summary

dbc docs already uses the docs_url from the registry index, but dbc info never showed it. This PR adds it to both the plaintext and the JSON output.

In plaintext, there's a new Docs: line after Description:. It only shows up when the driver has a docs URL:

$ dbc info snowflake
Driver: snowflake
Version: 1.14.0
Title: ASF Snowflake Driver
License: Apache-2.0
Description: An ADBC driver for Snowflake developed under the Apache Software Foundation
Docs: https://adbc-drivers.org/drivers/snowflake/
Available Packages:
   - linux_amd64
   ...

With --json, the driver.info payload gets a docs_url field:

{"schema_version":1,"kind":"driver.info","payload":{"driver":"snowflake", ..., "description":"...","docs_url":"https://adbc-drivers.org/drivers/snowflake/","packages":[...]}}

A few choices I made

I went with Docs: as the label since it's short and matches dbc docs. Drivers without a docs URL get no line at all, so their output doesn't change.

In the JSON, docs_url is always there (empty string when unset). I left out omitempty on purpose, so it behaves like title, license and description right next to it. The field is new, so schema_version stays at 1.

Easy to change any of these if you'd prefer something else.

The tests reuse the existing test-driver-docs-url fixture, and also check that a driver without a docs URL gets no Docs: line and an empty docs_url.

Not in this PR

dbc search -v --json doesn't include docs_url either. I can do that in a follow-up if you want it.

Test plan

  • go test ./... passes with Go 1.26.8 (env and user levels)
  • New tests fail without the change and pass with it
  • go vet ./... clean; changed files are gofmt-clean
  • Manual: dbc info snowflake and dbc info snowflake --json against the default registry show the docs URL

Display the registry's docs_url for a driver in `dbc info` output:
a "Docs:" line in plaintext (only when set) and a docs_url field in
the --json payload (always present, empty when unset).

Closes columnar-tech#499

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great. Just two small changes.

Thanks for taking the time to contribute here!

Comment thread cmd/dbc/info.go Outdated
Comment thread cmd/dbc/info_test.go Outdated
Address review feedback: spell out the "Documentation:" label to
match the other unabbreviated fields, and render the URL as an
underlined OSC 8 hyperlink so it is clickable in terminals without
URL auto-detection. Escape codes are still stripped when stdout is
not a terminal.

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes and sorry for the delay in reviewing. I'm going to remove the added Underline() style since I'm not sure it's needed.

Comment thread cmd/dbc/info.go Outdated
@amoeba
amoeba merged commit 83bcfa3 into columnar-tech:main Oct 13, 2026
15 checks passed
@amoeba

amoeba commented Oct 13, 2026

Copy link
Copy Markdown
Member

Merged, thanks again.

@djfrancesco

Copy link
Copy Markdown
Contributor Author

Thanks for the review and the merge!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dbc docs url to dbc info

2 participants