Make failure handling in EventRecorder configurable (fail-on-error option)
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #3688 @afalhambra-hivemq による — マージ済み
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java, kubernetes
調査の方向性
Start by locating DefaultEventRecorder#record and the EventSink#emit call described in the issue. Read the recorder's existing tests and identify how its construction or configuration is covered. Add an opt-in fail-on-error setting while preserving the current default, then verify that enabled failures propagate and disabled failures remain logged and swallowed.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Currently, DefaultEventRecorder#record treats recording strictly as "best effort": any exception thrown when writing to the API server via EventSink#emit is logged as a warning and swallowed:
try {
sink.emit(toEvent(context, event), context);
} catch (Exception e) {
// recording an event must never break the caller: a controller that fails to reconcile
// because it could not write an event is strictly worse than one that records nothing
log.warn("Could not record {} event ...", ...);
}
While swallowing errors is desirable for informational telemetry, in our use case (and in environments with strict audit, compliance, or state tracking requirements), emitting a Kubernetes Event is considered part of the required reconciliation side-effects. If the event cannot be persisted (e.g. due to RBAC issues, network partition, or API server failure), continuing reconciliation without failing leaves the cluster in an inconsistent or un-audited state. We want the reconciliation to fail and re-queue/retry when an event fails to be recorded.
Describe the solution you'd like
Make this behavior configurable. When enabled, failures to record an event should propagate as an exception to trigger standard error handling and reconciliation retries, while keeping the current non-failing behavior as the default.
Describe alternatives you've considered
Extending DefaultEventRecorder and overriding the record method. However, this is not clean because it requires duplicating framework logic (such as parameter validation and calling toEvent(...) / sink.emit(...)) just to bypass the try-catch block.
Additional context
None
- 主要言語
- Java
- スター
- 945
- フォーク
- 247
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
operator-framework/java-operator-sdk のほかの issue
-
Cannot record events outside reconciliation loop or for arbitrary resources (`RegisteredController#eventRecorder` missing)対応中かも @afalhambra-hivemq が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
operator-framework/java-operator-sdk#3686 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
on-demand
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
operator-framework/java-operator-sdk#3671 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
operator-framework/java-operator-sdk#3643 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
operator-framework/java-operator-sdk#3568 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
operator-framework/java-operator-sdk#3563 ·
メンテナーはふだん 1 日以内に返信
operator-framework/java-operator-sdk の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hiero-ledger/hiero-mirror-node#14665 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
cadence-workflow/cadence#8745 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oracle/graalvm-reachability-metadata#12168 ·
メンテナーはふだん 1 日以内に返信
-
area/frontend area/test kind/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
camunda/camunda#69073 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Patient profile returns a server error for a person with observation periods but no clinical records対応中かも @DG47 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信