Use an Optional type for Event and Attempt fields that log store reads may skip
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the definitions of models.Event and models.Attempt and trace how their fields are marshalled through publish, delivery, MQ messages, filters, destination providers, and the API. Check the existing tests and benchmarks for JSON compatibility and delivery allocations. Done means the optional fields preserve the current wire format, distinguish unread from stored empty values, and meet the stated hot path constraint.
索引モデルが issue の本文から書いたものです。
説明
Log store reads now take an Include option (#1187): ListAttempt reads Event.Data, Event.Metadata and Attempt.ResponseData only when the caller asks for them. So these fields on models.Event and models.Attempt can be absent, and are left nil.
The current types (json.RawMessage, maps) can already be nil, so this works. Nothing in the model says it can happen, though, and nil can't tell "not read" from "stored empty". A generic Optional[T] (Value T, Valid bool) on these three fields would make that visible while writing code: whoever reads the field handles the absent case on purpose. A caller that forgets Include today gets an empty value with no error; for example, a retry would deliver the event with no data. For now, #1187 adds a doc comment on each field.
Things to keep
- Same wire format:
models.Eventandmodels.Attemptgo through publish, delivery, MQ messages, filters (ParsedData), every destination provider and the API.Optional[T]must marshal as the inner value (ornull) and unmarshal without changing the JSON. - Hot path: delivery reads
Event.Dataon every attempt. Marshalling must not add allocations or reflection.
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 70
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 34
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hookdeck/outpost のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
hookdeck/outpost#1195 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hookdeck/outpost#1194 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 3 日以内に返信
hookdeck/outpost の issue をすべて見る
似ている issue
-
agent-butler-finding bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jordansmall/spindrift#6414 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Icinga/icinga-kubernetes#294 ·
メンテナーはふだん 4 日以内に返信
-
Cluster details: the Control Plane version field has a different border color than its icon boxオープンkind/design sig/ui
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
kubermatic/dashboard#8449 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
filecoin-project/curio#1632 ·
メンテナーはふだん 1 日以内に返信