Skip to content

go: document embedding and publish duckdb-server-go module releases #1128

Description

@derekperkins

Summary

Document the supported embedding workflow and establish a repeatable release path for the nested duckdb-server-go module after its public packages are stable.

The repository currently documents go install -tags=duckdb_arrow ...@latest, but the newest matching module tag is packages/server/duckdb-server-go/v0.21.1. There are multiple later Go-server changes on main, including the authorization hardening in #1106 and #1117-#1121. External consumers need a tag that actually contains the reusable packages and current security behavior.

Documentation

Add concise examples for:

  • importing and constructing pkg/query;
  • serving pkg/server with a caller-owned http.Server;
  • wrapping the handler with normal authentication/observability middleware;
  • installing the optional command authorizer and schema-header example;
  • configuring the reusable extension initializer; and
  • deterministic shutdown and resource ownership.

Also document:

  • the required duckdb_arrow build tag;
  • the minimum supported Go version;
  • concurrency and cache semantics that callers may rely on;
  • which errors are safe to classify with errors.Is;
  • the difference between the reusable libraries and the module-root example binary;
  • that the example server and its policies are candidate implementations, not a Mosaic protocol/security standard; and
  • the limits of SQL authorization: it is not process, filesystem, network, extension, catalog, or credential isolation.

Keep flag parsing, localhost TLS discovery, process logging, and listen/shutdown policy in the example binary unless there is a separate reason to make them reusable. Publishing the packages should not freeze every behavior currently in main.go.

Release path

  • Define how and when tags matching the nested module path are cut: packages/server/duckdb-server-go/vX.Y.Z.
  • Prefer an automated or documented release check that refuses to tag until the Go tests/lint pass and the tag points at the intended commit.
  • Decide and state the compatibility policy while the module is pre-v1. Accidental exports from the mechanical move are not automatically stable APIs.
  • Verify both library consumption and binary installation through the public Go proxy/module tooling.

Acceptance criteria

Sequencing

This is the final integration/publication issue. Documentation can be drafted alongside implementation, but the compatibility statement and module tag follow the public API, extension, generic authorization, and schema-adapter work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions