uber / uber/submitqueue

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

Aperta
#209 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Go
Stelle
225
Fork
11
Merge medio
3g 8h
PR unite (30g)
61

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo la Change API e i parser indicati: submitqueue/entity/github/change_id.go, submitqueue/entity/phabricator/change_id.go e submitqueue/extension/changeprovider/github/validate.go. Esamina la PR #197 e la discussione su core/fakemarker prima di confrontare i parametri di query, i frammenti e un campo Change tipizzato. Il lavoro è completato quando sono state risolte le questioni relative ad ambito, forma e generalità e il design scelto è stato documentato o implementato senza compromettere la validazione rigorosa di change-ID.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
go
Ambito
backend-api-design
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.