Deprecate BaseURL in favor of explicit registry lists

Abierto
#561 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, javascript, rust, wasm

Línea de trabajo

Read the binding and CLI changes in PRs #547, #548, and #551, along with the discussion linked from this issue. Trace each listed BaseURL option and its registry-list replacement, then review the existing CLI override test named TestInstallCmdDBCBaseURLOverridesGlobalConfig. Done means the binding API decision and CLI environment-variable behavior are resolved and the affected options and tests reflect that choice.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Follow-up from https://github.com/columnar-tech/dbc/pull/545#discussion_r4461229855.

BaseURL predates registry configuration and has outlived its purpose. It overlaps with explicit registry lists and adds a precedence rule to every entry point. #551 adds an explicit, ordered registries list to every binding, which covers the same need:

Surface BaseURL form Replacement (from #551)
Go library dbc.WithBaseURL(url) dbc.WithRegistries([]dbc.Registry{{BaseURL: u}})
internal/api ClientConfig.BaseURL ClientConfig.Registries
C API DBC_OPTION_BASE_URL registry.<n>.url / DBC_OPTION_REGISTRY_COUNT
Rust ClientConfig::base_url ClientConfig::registries(...)
npm-wasm baseURL registries
CLI DBC_BASE_URL env var see below

Proposal

  1. Bindings (unreleased): remove baseURL from internal/api, the C API, Rust and npm-wasm before their first release, so they launch with a single way to choose registries. Removing it now costs nothing; after release it would need a deprecation cycle.
  2. Go library: mark dbc.WithBaseURL // Deprecated: in favor of WithRegistries, and remove it in a later release. It has been public API since v0.2.0.
  3. CLI: DBC_BASE_URL is the documented way to recover from a broken registry config: it overrides the global config.toml (TestInstallCmdDBCBaseURLOverridesGlobalConfig). Keep that ability, either by implementing DBC_BASE_URL on top of WithRegistries, or by replacing it with an env var that accepts a registry list, deprecating DBC_BASE_URL first.

Open questions

  • Should step 1 land in the binding PR stack (#547/#548/#551) before their first release, or separately?
  • Does the CLI env var stay DBC_BASE_URL, or should there be a list-valued replacement?
Lenguaje dominante
Go
Estrellas
154
Forks
15
Merge medio
2 d 19 h
PR fusionados (30 d)
38

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de columnar-tech/dbc

Todos los issues de columnar-tech/dbc

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.