Make failure handling in EventRecorder configurable (fail-on-error option)
Mantenedores costumam responder em até 1 dia
Um pull request relacionado já foi integrado.
- #3688 de @afalhambra-hivemq — integrado
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 68/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- java, kubernetes
- Domínio
- backend, distributed-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Java
- Estrelas
- 945
- Forks
- 247
- Merge médio
- 2d 10h
- PRs com merge (30d)
- 27
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de operator-framework/java-operator-sdk
-
Cannot record events outside reconciliation loop or for arbitrary resources (`RegisteredController#eventRecorder` missing)Talvez já em andamento @afalhambra-hivemq assumiu hoje. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 54/100
operator-framework/java-operator-sdk#3686 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
on-demand
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
operator-framework/java-operator-sdk#3671 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 62/100
operator-framework/java-operator-sdk#3643 · 7 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
operator-framework/java-operator-sdk#3568 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
operator-framework/java-operator-sdk#3563 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de operator-framework/java-operator-sdk
Issues semelhantes
-
ImporterNoConsensus and ImporterFileVerificationErrors alerts can't fire on consensus failureAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
hiero-ledger/hiero-mirror-node#14665 ·
Mantenedores costumam responder em até 1 dia
-
kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
cadence-workflow/cadence#8745 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
oracle/graalvm-reachability-metadata#12168 ·
Mantenedores costumam responder em até 1 dia
-
area/frontend area/test kind/tech-debt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
camunda/camunda#69073 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Patient profile returns a server error for a person with observation periods but no clinical recordsTalvez já em andamento @DG47 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia