Deprecate BaseURL in favor of explicit registry lists

オープン
#561 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, javascript, rust, wasm

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?
主要言語
Go
スター
154
フォーク
15
平均マージ
2日 19時間
マージ済み PR(30日)
38

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

columnar-tech/dbc のほかの issue

columnar-tech/dbc の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。