uber / uber/submitqueue

Consider a generic change-URI metadata/augmentation language (Change API)

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

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

主要言語
Go
スター
225
フォーク
11
平均マージ
3日 8時間
マージ済み PR(30日)
61

説明

Context

In #197, the extension fakes inject failures via an ad-hoc sq-fake=<token>
marker embedded in a change URI, parsed by the test-only core/fakemarker
package (Token([]string) / TokenInChanges([]entity.Change)).

Reviewing that PR, @sbalabanov raised two related design questions:

  • Should we build a generic augmentation / metadata language into change
    URIs, usable by these fakes and similar tooling — rather than a
    fake-specific marker convention?
  • The marker lookup (TokenInChanges) arguably belongs on the Change API
    (entity.Change) rather than living in a test-only helper.

This issue captures that idea as a follow-up so #197 can land as-is (the marker
stays test-only there).

Design considerations

A generic change-URI metadata facility would need to reconcile with the
strict provider change-ID parsers, which today reject anything that isn't a
canonical resource identifier:

  • submitqueue/entity/github/change_id.go — requires a full 40-char lowercase
    hex head SHA; a ?key=value query string would not parse.
  • submitqueue/entity/phabricator/change_id.go — fixed phab:// form.
  • submitqueue/extension/changeprovider/github/validate.go — rejects
    unexpected schemes.

Open questions:

  1. Scope — is URI-attached metadata a production capability, or strictly a
    test/example affordance? Putting parsing on entity.Change couples the
    production type to the convention; keeping it in core/fakemarker keeps the
    separation the fakes deliberately maintain ("never production").
  2. Shape — RFC-3986 query params (?k=v) vs. fragment vs. a dedicated
    sidecar field on Change. Query params collide with the strict parsers
    above; a typed field avoids string-encoding entirely.
  3. Generality — a neutral key → value accessor (e.g.
    Change.URIParam(key)) that fakemarker layers sq-fake semantics on top
    of, vs. a richer metadata model.

References

  • PR #197 — fake implementations with error injection
  • Threads: the core/fakemarker.go discussion in #197.

Filed as a follow-up per the #197 review discussion. Not blocking.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず Change API と参照されている parser を読みます: submitqueue/entity/github/change_id.go、submitqueue/entity/phabricator/change_id.go、submitqueue/extension/changeprovider/github/validate.go。query パラメータ、フラグメント、型付きの Change フィールドを比較する前に、PR #197 と core/fakemarker に関する議論を確認します。スコープ、形状、汎用性に関する問題を解決し、厳密な change-ID 検証を壊すことなく、選択した設計を文書化または実装できれば完了です。

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

評価

技術スタック
go
領域
backend-api-design
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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