rodmeneses commented on code in PR #575:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/575#discussion_r1179340070
##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/JobAutoScalerImpl.java:
##########
@@ -113,7 +115,13 @@ public boolean scale(FlinkResourceContext<? extends
AbstractFlinkResource<?, ?>>
scalingExecutor.scaleResource(resource, autoScalerInfo,
conf, evaluatedMetrics);
autoScalerInfo.replaceInKubernetes(kubernetesClient);
return specAdjusted;
- } catch (Exception e) {
+ } catch (Throwable e) {
+ eventRecorder.triggerEvent(
+ resource,
+ EventRecorder.Type.Warning,
+ EventRecorder.Reason.AutoscalerError,
+ EventRecorder.Component.Operator,
+ e.getMessage());
Review Comment:
if an NPE occurs, `e.gestMessage()` will be null. We need to make sure that
`triggerEvent` and the downstream caller are not throwing NPE because of this
--
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]