Make failure handling in EventRecorder configurable (fail-on-error option)
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #3688 của @afalhambra-hivemq — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java, kubernetes
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 945
- Fork
- 247
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của operator-framework/java-operator-sdk
-
Cannot record events outside reconciliation loop or for arbitrary resources (`RegisteredController#eventRecorder` missing)Có thể đã có người làm @afalhambra-hivemq đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
operator-framework/java-operator-sdk#3686 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
on-demand
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
operator-framework/java-operator-sdk#3671 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
operator-framework/java-operator-sdk#3643 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
operator-framework/java-operator-sdk#3568 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
operator-framework/java-operator-sdk#3563 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của operator-framework/java-operator-sdk
Issue tương tự
-
ImporterNoConsensus and ImporterFileVerificationErrors alerts can't fire on consensus failureĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hiero-ledger/hiero-mirror-node#14665 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cadence-workflow/cadence#8745 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
oracle/graalvm-reachability-metadata#12168 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/frontend area/test kind/tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
camunda/camunda#69073 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Patient profile returns a server error for a person with observation periods but no clinical recordsCó thể đã có người làm @DG47 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày