rmetzger commented on code in PR #1260:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1260#discussion_r4720704563
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/JobStatusObserver.java:
##########
@@ -207,11 +232,29 @@ protected void
observeJobManagerExceptions(FlinkResourceContext<R> ctx) {
}
}
+ private void reportExceptionHistoryTooLarge(
+ FlinkResourceContext<R> ctx, MemorySize maxResponseSize) {
+ // A JobException event would mark the exceptions up to its time as
reported after an
+ // operator restart
+ eventRecorder.triggerEventOnce(
+ ctx.getResource(),
+ EventRecorder.Type.Warning,
+ EventRecorder.Reason.JobExceptionHistoryTooLarge,
+ String.format(
+ "The exception history of the job is larger than %s,
the smaller of %s and %s, so its exceptions are not reported.",
+ maxResponseSize,
+
KubernetesOperatorConfigOptions.OPERATOR_EVENT_EXCEPTION_MAX_RESPONSE_SIZE
+ .key(),
+ RestOptions.CLIENT_MAX_CONTENT_LENGTH.key()),
+ EventRecorder.Component.Job,
+ null,
Review Comment:
> This event should have a constant key, otherwise it will be reported in
every reconciliation round as a new event.
I would actually argue that we'd need better test coverage if this change is
breaking this. This should be fairly straightforward to test, maybe even in an
ITCase using Fabric8's `KubernetesMockServer` otherwise in the e2e tests
against a real K8s impl?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]