Copilot commented on code in PR #1260:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1260#discussion_r4710016485


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/JobStatusObserver.java:
##########
@@ -424,7 +502,11 @@ private void recordJobErrorIfPresent(
                                             EventRecorder.Type.Warning,
                                             EventRecorder.Reason.Error,
                                             EventRecorder.Component.Job,
-                                            
ExceptionUtils.getExceptionMessage(t),
+                                            truncateExceptionText(
+                                                    
ExceptionUtils.getExceptionMessage(t),
+                                                    ctx.getOperatorConfig()
+                                                            
.getReportedExceptionEventsMaxStackTraceLength(),
+                                                    -1),

Review Comment:
   This `triggerEvent` overload also uses the message as its deduplication key. 
Two failed-job errors with the same retained prefix and total length now merge 
into one `Error` event even when their omitted causes differ; previously their 
full messages produced separate events. Please derive an explicit message key 
from the full exception message and truncate only the displayed text, as the 
`JobException` path now does.



-- 
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]

Reply via email to