mxm commented on code in PR #509: URL: https://github.com/apache/flink-kubernetes-operator/pull/509#discussion_r1085133129
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/ScalingExecutor.java: ########## @@ -116,6 +133,20 @@ public boolean scaleResource( return true; } + private static String scalingReport(Map<JobVertexID, ScalingSummary> scalingSummaries) { Review Comment: ```suggestion private static String stringifiedScalingReport(Map<JobVertexID, ScalingSummary> scalingSummaries) { ``` ########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/ScalingExecutor.java: ########## @@ -99,14 +103,27 @@ public boolean scaleResource( return false; } + var scalingReport = scalingReport(scalingSummaries); + eventRecorder.triggerEvent( + resource, + EventRecorder.Type.Normal, + EventRecorder.Reason.ScalingReport, + EventRecorder.Component.Operator, + scalingReport); + + if (!conf.get(SCALING_ENABLED)) { + return false; + } Review Comment: Moving this condition here will generate scaling events even though the scaling is disabled. I think this is not expected. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org